/** * @param tileRasterWidth * the tileRasterWidth to set */ public final void setTileRasterWidth( int tileRasterWidth ) { this.tileRasterWidth = tileRasterWidth; updateForRasterSize(); }
/** * @param tileRasterHeight * the tileRasterHeight to set */ public final void setTileRasterHeight( int tileRasterHeight ) { this.tileRasterHeight = tileRasterHeight; updateForRasterSize(); }
private void instantiate( int targetColumns, int targetRows, Envelope rasterEnvelope, RasterGeoReference geoRef, File gridFile, RasterDataInfo dataInfo ) { synchronized ( LOCK ) { if ( rasterEnvelope == null ) { throw new NullPointerException( "The grid writer needs an envelope to work with." ); } if ( geoRef == null ) { throw new NullPointerException( "The grid writer needs a raster georeference to work with." ); } this.envelope = geoRef.relocateEnvelope( OriginLocation.OUTER, rasterEnvelope ); this.columns = targetColumns; this.rows = targetRows; this.geoRef = geoRef.createRelocatedReference( OriginLocation.OUTER ); int[] rasterCoordinate = this.geoRef.getSize( this.envelope ); this.gridFile = gridFile; // if ( this.gridFile != null && !this.gridFile.exists() ) { // this.gridFile.createNewFile(); // } this.dataInfo = dataInfo; this.tilesInFile = columns * rows; this.tileRasterWidth = Rasters.calcTileSize( rasterCoordinate[0], columns ); this.tileRasterHeight = Rasters.calcTileSize( rasterCoordinate[1], rows ); // this tile data does not need to be cached. updateForRasterSize(); } }