Class Orthorectifier

  • All Implemented Interfaces:
    GeoCoding
    Direct Known Subclasses:
    Orthorectifier2

    public class Orthorectifier
    extends Object
    implements GeoCoding
    An Orthorectifier is a GeoCoding which performs an orthorectification algorithm on a base GeoCoding.

    IMPORTANT NOTE: This class is not thread save. In order to use it safely, make sure to create a new instance of this class for each orthorectifying thread.

    Version:
    $Revision$ $Date$
    • Constructor Detail

      • Orthorectifier

        public Orthorectifier​(int sceneRasterWidth,
                              int sceneRasterHeight,
                              Pointing pointing,
                              ElevationModel elevationModel,
                              int maxIterationCount)
        Constructs a new Orthorectifier.
        Parameters:
        sceneRasterWidth - the scene raster width of the product which uses this orthorectifier as geo coding. Must be greater than zero.
        sceneRasterHeight - the scene raster width of the product which uses this orthorectifier as geo coding. Must be greater than zero.
        pointing - the pointing, provides satellites viewing direction and base geo-coding. Must not be null.
        elevationModel - the provider for the elevation at a given lat/lon
        maxIterationCount - the maximum number of iterations, 10 is good choice. Must be greater than one.
    • Method Detail

      • getDatum

        public Datum getDatum()
        Gets the datum, the reference point or surface against which GeoPos measurements are made.
        Specified by:
        getDatum in interface GeoCoding
        Returns:
        the datum
      • getImageCRS

        public org.opengis.referencing.crs.CoordinateReferenceSystem getImageCRS()
        Specified by:
        getImageCRS in interface GeoCoding
        Returns:
        The image coordinate reference system (CRS). It is usually derived from the base CRS by including a linear or non-linear transformation from base (geodetic) coordinates to image coordinates.
      • getMapCRS

        public org.opengis.referencing.crs.CoordinateReferenceSystem getMapCRS()
        Specified by:
        getMapCRS in interface GeoCoding
        Returns:
        The map coordinate reference system (CRS). It may be either a geographical CRS (nominal case is "WGS-84") or a derived projected CRS, e.g. "UTM 32 - North".
      • getGeoCRS

        public org.opengis.referencing.crs.CoordinateReferenceSystem getGeoCRS()
        Specified by:
        getGeoCRS in interface GeoCoding
        Returns:
        The geographical coordinate reference system (CRS). It may be either "WGS-84" (nominal case) or any other geographical CRS.
      • getImageToMapTransform

        public org.opengis.referencing.operation.MathTransform getImageToMapTransform()
        Specified by:
        getImageToMapTransform in interface GeoCoding
        Returns:
        The math transformation used to convert image coordinates to map coordinates.
      • getPointing

        public Pointing getPointing()
      • getGeoCoding

        public GeoCoding getGeoCoding()
      • getMaxIterationCount

        public int getMaxIterationCount()
      • getPixelPos

        public PixelPos getPixelPos​(GeoPos geoPos,
                                    PixelPos pixelPos)
        Returns the source pixel coordinate for a true (corrected) geographical coordinate.

        Implements the prediction/correction algorithm from the MERIS Geometry Handbook, VT-P194-DOC-001-E, iss 1, rev 4, page 29, figure 23.

        Scope of the prediction/correction algorithm is to retrieve the pixel x,y that matches the true lat,lon by the direct location model f(x,y) = lat,lon.

        Specified by:
        getPixelPos in interface GeoCoding
        Parameters:
        geoPos - the true (corrected) geographical coordinate as lat/lon.
        pixelPos - an instance of Point to be used as return value. If this parameter is null, the method creates a new instance which it then returns.
        Returns:
        the source pixel coordinate
      • getGeoPos

        public GeoPos getGeoPos​(PixelPos pixelPos,
                                GeoPos geoPos)
        Gets the true (corrected) geographical coordinate for a given source pixel coordinate.
        Specified by:
        getGeoPos in interface GeoCoding
        Parameters:
        pixelPos - the pixel coordinate given as x,y
        geoPos - an instance of GeoPos to be used as return value. If this parameter is null, the method creates a new instance which it then returns.
        Returns:
        the true (corrected) geographical coordinate as lat/lon.
      • canGetGeoPos

        public boolean canGetGeoPos()
        Checks whether or not this geo-coding can determine the geodetic position from a pixel position.
        Specified by:
        canGetGeoPos in interface GeoCoding
        Returns:
        true, if so
      • canGetPixelPos

        public boolean canGetPixelPos()
        Checks whether or not this geo-coding can determine the pixel position from a geodetic position.
        Specified by:
        canGetPixelPos in interface GeoCoding
        Returns:
        true, if so
      • isCrossingMeridianAt180

        public boolean isCrossingMeridianAt180()
        Checks whether or not the longitudes of this geo-coding cross the +/- 180 degree meridian.
        Specified by:
        isCrossingMeridianAt180 in interface GeoCoding
        Returns:
        true, if so
      • clone

        public GeoCoding clone()
        Creates a shallow clone of this geocoding. Geolocation raster data is shared.
        Specified by:
        clone in interface GeoCoding
        Overrides:
        clone in class Object
        Returns:
        the cloned geocoding
      • canClone

        public boolean canClone()
        Check if geocoding can be cloned.
        Specified by:
        canClone in interface GeoCoding
        Returns:
        if so or not
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • dispose

        public void dispose()
        Releases all of the resources used by this object instance and all of its owned children. Its primary use is to allow the garbage collector to perform a vanilla job.

        This method should be called only if it is for sure that this object instance will never be used again. The results of referencing an instance of this class after a call to dispose() are undefined.

        Specified by:
        dispose in interface GeoCoding
      • isPixelPosValid

        protected final boolean isPixelPosValid​(PixelPos pixelPos)
      • getElevation

        protected final double getElevation​(GeoPos geoPos,
                                            PixelPos pixelPos)