Class GeoReferencedRaster
- java.lang.Object
-
- com.vividsolutions.jump.workbench.imagery.geoimg.GeoRaster
-
- com.vividsolutions.jump.workbench.imagery.geoimg.GeoReferencedRaster
-
- All Implemented Interfaces:
Disposable
public class GeoReferencedRaster extends GeoRaster
Most georeferencing is done from this class. Georeferencing may use GeoTiff tags, GDAL metadata or a worlfile like tfw, pgw or jgw.In geotiff, the Raster Space is defined by GTRasterTypeGeoKey and can be RasterPixelIsArea or RasterPixelIsPoint.
In RasterPixelIsArea, image coordinate (0,0) is the upper left coordinate of the image and the first pixel value applies to the whole cell (from coordinate (0,0) to (1,1)). This is the default value, but it is now recommended to specify it explicitly.
In RasterPixelIsPoint, we consider that the first value of the image matrix (0,0) applies to point located at the center of the upper left pixel. This is mostly used for elevation dataset like DTM
Geotiff georeferencement may be defined as a transformation matrix or from a tiepoint and scale factors. Georeferencement from several tiepoints is not supported by OpenJUMP).
Warning : if georeferencement is defined by a single tiepoint along with a scalex and a scaley factor, the tiepoint may be on the upper-left corner of the upper-left pixel, on the center of the pixel or at any place as long as the model coordinate represent the transformation of the image coordinate (see here after for the interpretation of image coordinate)
World file defines an affine transformation with its tx and ty translation parameters defined relatively to the center of the upper left pixel.
javadoc added by mmichaud on 2021-05-23
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GeoReferencedRaster.PixelType
-
Field Summary
-
Fields inherited from class com.vividsolutions.jump.workbench.imagery.geoimg.GeoRaster
cache_hints, fixed_reader, imageFileLocation, src, type, used_loader
-
-
Constructor Summary
Constructors Constructor Description GeoReferencedRaster(String location)
Called by Java2XMLGeoReferencedRaster(String location, Object reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.locationtech.jts.geom.Coordinate
getCoorRasterTiff_tiepointLT()
Deprecated.org.locationtech.jts.geom.Envelope
getEnvelope()
org.locationtech.jts.geom.Envelope
getEnvelope(Feature f)
org.locationtech.jts.geom.Coordinate
getModelULPixelCenter()
org.locationtech.jts.geom.Envelope
getOriginalEnvelope()
double
getScaleX()
double
getScaleY()
protected void
readRasterfile()
initialize the img and try to parse geo infos via (in this order) worldfile, gdal or geotiff-
Methods inherited from class com.vividsolutions.jump.workbench.imagery.geoimg.GeoRaster
createCacheRenderingHints, createInput, createInput, createInputStream, createJAIRenderedOP, dispose, disposeInput, fetchRaster, fullContrast, getImage, getLoader, getMaximumExtreme, getMinimumExtreme, getRenderedOp, getType, getURI, hasFileExtension, hasFileExtension, hasNoFileExtensions, listAllReaders, listValidImageIOReaders, listValidJAICodecs, listValidReaders, normalize
-
-
-
-
Constructor Detail
-
GeoReferencedRaster
public GeoReferencedRaster(String location) throws ReferencedImageException
Called by Java2XML- Throws:
ReferencedImageException
-
GeoReferencedRaster
public GeoReferencedRaster(String location, Object reader) throws ReferencedImageException
- Throws:
ReferencedImageException
-
-
Method Detail
-
readRasterfile
protected void readRasterfile() throws ReferencedImageException
initialize the img and try to parse geo infos via (in this order) worldfile, gdal or geotiff- Overrides:
readRasterfile
in classGeoRaster
- Throws:
ReferencedImageException
-
getEnvelope
public org.locationtech.jts.geom.Envelope getEnvelope()
-
getOriginalEnvelope
public org.locationtech.jts.geom.Envelope getOriginalEnvelope()
-
getModelULPixelCenter
public org.locationtech.jts.geom.Coordinate getModelULPixelCenter()
- Returns:
- coordinate of left-top corner in the model coordinate system
-
getCoorRasterTiff_tiepointLT
@Deprecated public org.locationtech.jts.geom.Coordinate getCoorRasterTiff_tiepointLT()
Deprecated.- Returns:
- coordinate of left-top corner in the raster coordinate system
-
getScaleX
public double getScaleX()
- Returns:
- number of model units per raster unit along X axis
-
getScaleY
public double getScaleY()
- Returns:
- number of model units per raster unit along Y axis
-
getEnvelope
public org.locationtech.jts.geom.Envelope getEnvelope(Feature f) throws ReferencedImageException
- Throws:
ReferencedImageException
-
-