/** * @param tileRasterWidth * the tileRasterWidth to set */ public final void setTileRasterWidth( int tileRasterWidth ) { this.tileRasterWidth = tileRasterWidth; updateForRasterSize(); }
private long calcFilePosition( int column, int row ) { long tileId = getTileId( column, row ); // System.out.println( "row: " + row + ", col: " + column + " is tile in file: " + tileId ); long tileInBlob = tileId % tilesInFile; // System.out.println( "tile in blob: " + tileInBlob ); return tileInBlob * bytesPerTile; }
/** * @return the number of grid columns */ public int getTileColumns() { return infoFile.columns(); }
/** * @param gridFile * @param options * @throws IOException */ public GridFileReader( File gridFile, RasterIOOptions options ) throws IOException { instantiate( gridFile, options ); // TODO Auto-generated constructor stub }
@Override public AbstractRaster load( File filename, RasterIOOptions options ) throws IOException { return originalReader.load( filename, options ); }
/** * @return the number of tiles in this blob. */ public int getNumberOfTiles() { return this.getTilesPerBlob(); }
@Override public void dispose() { originalReader.dispose(); } }
@Override public int getHeight() { return originalReader.getHeight(); }
@Override public Set<String> getSupportedFormats() { return originalReader.getSupportedFormats(); }
@Override public String getDataLocationId() { return originalReader.getDataLocationId(); }
/** * @return the height of a tile in raster coordinates. */ public int getTileRasterHeight() { return this.infoFile.getTileRasterHeight(); }
/** * @return the width of a tile in raster coordinates. */ public int getTileRasterWidth() { return this.infoFile.getTileRasterWidth(); }
/** * @return the number of grid rows */ public int getTileRows() { return infoFile.rows(); }
@Override public RasterGeoReference getGeoReference() { return infoFile.getGeoReference(); }
@Override public RasterGeoReference getGeoReference() { return originalReader.getGeoReference(); }
@Override public int getWidth() { return originalReader.getWidth(); }
/** * @param tileRasterHeight * the tileRasterHeight to set */ public final void setTileRasterHeight( int tileRasterHeight ) { this.tileRasterHeight = tileRasterHeight; updateForRasterSize(); }
/** * Calculates the id for a tile at a given position in the grid. * * @param columnId * column id, must be in the range [0 ... #columns - 1] * @param rowId * row id, must be in the range [0 ... #rows - 1] * @return the tile's id */ protected int getTileId( int columnId, int rowId ) { return rowId * infoFile.columns() + columnId; }
/** * @param infoFile * @param gridFile */ public GridFileReader( GridMetaInfoFile infoFile, File gridFile ) { instantiate( infoFile, gridFile ); // TODO Auto-generated constructor stub }
@Override public AbstractRaster load( InputStream stream, RasterIOOptions options ) throws IOException { return originalReader.load( stream, options ); }