Codota Logo
GridFileReader.getBytesPerTile
Code IndexAdd Codota to your IDE (free)

How to use
getBytesPerTile
method
in
org.deegree.coverage.raster.io.grid.GridFileReader

Best Java code snippets using org.deegree.coverage.raster.io.grid.GridFileReader.getBytesPerTile (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: deegree/deegree3

@Override
protected void read( int columnId, int rowId, ByteBuffer buffer )
            throws IOException {
  int tileId = getTileId( columnId, rowId );
  long begin = System.currentTimeMillis();
  int tileInBlob = tileId % getTilesPerBlob();
  // transfer the data from the blob
  try {
    synchronized ( LOCK ) {
      FileChannel channel = getFileChannel();
      // MappedByteBuffer map = channel.map( MapMode.READ_ONLY, tileInBlob * getBytesPerTile(),
      // buffer.remaining() );
      // buffer.put( map );
      // map.
      // LOG.debug( "Tile id: {} -> pos in blob: {}", tileId, +tileInBlob );
      channel.position( tileInBlob * getBytesPerTile() );
      channel.read( buffer );
      closeReadStream();
    }
    // rewinding is not an option, buffer.rewind();
  } catch ( IOException e ) {
    LOG.error( "Error reading tile data from blob: " + e.getMessage(), e );
  }
  long elapsed = System.currentTimeMillis() - begin;
  if ( LOG.isDebugEnabled() ) {
    LOG.debug( "Loading of tile ({}x{}) in {} ms.", new Object[] { infoFile.getTileRasterWidth(),
                                   infoFile.getTileRasterHeight(), elapsed } );
  }
}
origin: deegree/deegree3

long filePos = ( ( tileId % getTilesPerBlob() ) * getBytesPerTile() );
origin: deegree/deegree3

int expectedTilesPerBlob = (int) ( gridFile.length() / getBytesPerTile() );
if ( getTilesPerBlob() != expectedTilesPerBlob ) {
  LOG.error( "the number of tiles in the blob are wrong." );
org.deegree.coverage.raster.io.gridGridFileReadergetBytesPerTile

Popular methods of GridFileReader

  • <init>
  • load
  • closeReadStream
  • dispose
  • getDataLocationId
  • getFileChannel
  • getGeoReference
  • getIntersectingTiles
  • getTile
  • getTileData
  • getTileId
  • getTilesPerBlob
  • getTileId,
  • getTilesPerBlob,
  • instantiate,
  • leaveStreamOpen,
  • read,
  • readValuesFromTile,
  • snapToGrid

Popular in Java

  • Making http post requests using okhttp
  • addToBackStack (FragmentTransaction)
  • orElseThrow (Optional)
  • getSystemService (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Path (java.nio.file)
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now