in.readDouble(), in.readDouble(), (CRS) in.readObject() ); envelope.setCoordinateSystem( rasterGeoReference.getCrs() ); resolutionInfo = (ResolutionInfo) in.readObject(); options = (RasterIOOptions) in.readObject();
out.writeDouble( rasterGeoReference.getOriginEasting() ); out.writeDouble( rasterGeoReference.getOriginNorthing() ); out.writeObject( rasterGeoReference.getCrs() ); out.writeObject( resolutionInfo ); out.writeObject( options );
raster.setCoordinateSystem( container.getRasterReference().getCrs() );
raster.setCoordinateSystem( container.getRasterReference().getCrs() );
/** * * see http://www.remotesensing.org/geotiff/spec/geotiff2.4.html#2.4 especially the KeyEntry part. * * The key (Integer) is the GeoTIFF Key ID http://www.remotesensing.org/geotiff/spec/geotiff6.html#6.2 The value is * an int array of the size 3. If you want to store simple GeoTIFF key-values set the array to { 0, 1, VALUE }. * * @return a Tifffield containing the geo directory, which contains keys for the crs description and the raster * type. */ private static TIFFField createDirectoryTag( RasterGeoReference geoRef ) { Map<Integer, char[]> geoKeyDirectoryTag = new HashMap<Integer, char[]>(); addCRS( geoKeyDirectoryTag, geoRef.getCrs() ); addGTRasterTypeGeoKey( geoKeyDirectoryTag, geoRef.getOriginLocation() ); // space for the header and the keys. char[] geoKeys = extractGeoKeys( geoKeyDirectoryTag ); if ( geoKeys.length > 4 ) { TIFFTag tag = GEO_TAG_SET.getTag( GeoTIFFTagSet.TAG_GEO_KEY_DIRECTORY ); return new TIFFField( tag, TIFFTag.TIFF_SHORT, geoKeys.length, geoKeys ); } return null; }