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
  • Constructor Details

  • Method Details

    • 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 class GeoRaster
      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