Package org.esa.snap.core.dataop.dem
Class Orthorectifier
- java.lang.Object
-
- org.esa.snap.core.dataop.dem.Orthorectifier
-
- All Implemented Interfaces:
GeoCoding
- Direct Known Subclasses:
Orthorectifier2
public class Orthorectifier extends Object implements GeoCoding
AnOrthorectifier
is aGeoCoding
which performs an orthorectification algorithm on a baseGeoCoding
.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$
-
-
Field Summary
Fields Modifier and Type Field Description static float
PIXEL_EPS
static float
PIXEL_EPS_SQR
-
Constructor Summary
Constructors Constructor Description Orthorectifier(int sceneRasterWidth, int sceneRasterHeight, Pointing pointing, ElevationModel elevationModel, int maxIterationCount)
Constructs a newOrthorectifier
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canClone()
Check if geocoding can be cloned.boolean
canGetGeoPos()
Checks whether or not this geo-coding can determine the geodetic position from a pixel position.boolean
canGetPixelPos()
Checks whether or not this geo-coding can determine the pixel position from a geodetic position.GeoCoding
clone()
Creates a shallow clone of this geocoding.void
dispose()
Releases all of the resources used by this object instance and all of its owned children.boolean
equals(Object o)
Datum
getDatum()
Gets the datum, the reference point or surface against whichGeoPos
measurements are made.protected double
getElevation(GeoPos geoPos, PixelPos pixelPos)
ElevationModel
getElevationModel()
GeoCoding
getGeoCoding()
org.opengis.referencing.crs.CoordinateReferenceSystem
getGeoCRS()
GeoPos
getGeoPos(PixelPos pixelPos, GeoPos geoPos)
Gets the true (corrected) geographical coordinate for a given source pixel coordinate.org.opengis.referencing.crs.CoordinateReferenceSystem
getImageCRS()
org.opengis.referencing.operation.MathTransform
getImageToMapTransform()
org.opengis.referencing.crs.CoordinateReferenceSystem
getMapCRS()
int
getMaxIterationCount()
PixelPos
getPixelPos(GeoPos geoPos, PixelPos pixelPos)
Returns the source pixel coordinate for a true (corrected) geographical coordinate.Pointing
getPointing()
int
hashCode()
boolean
isCrossingMeridianAt180()
Checks whether or not the longitudes of this geo-coding cross the +/- 180 degree meridian.protected boolean
isPixelPosValid(PixelPos pixelPos)
-
-
-
Field Detail
-
PIXEL_EPS
public static final float PIXEL_EPS
- See Also:
- Constant Field Values
-
PIXEL_EPS_SQR
public static final float PIXEL_EPS_SQR
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Orthorectifier
public Orthorectifier(int sceneRasterWidth, int sceneRasterHeight, Pointing pointing, ElevationModel elevationModel, int maxIterationCount)
Constructs a newOrthorectifier
.- 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 benull
.elevationModel
- the provider for the elevation at a given lat/lonmaxIterationCount
- 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 whichGeoPos
measurements are made.
-
getImageCRS
public org.opengis.referencing.crs.CoordinateReferenceSystem getImageCRS()
- Specified by:
getImageCRS
in interfaceGeoCoding
- 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()
-
getGeoCRS
public org.opengis.referencing.crs.CoordinateReferenceSystem getGeoCRS()
-
getImageToMapTransform
public org.opengis.referencing.operation.MathTransform getImageToMapTransform()
- Specified by:
getImageToMapTransform
in interfaceGeoCoding
- Returns:
- The math transformation used to convert image coordinates to map coordinates.
-
getPointing
public Pointing getPointing()
-
getGeoCoding
public GeoCoding getGeoCoding()
-
getElevationModel
public ElevationModel getElevationModel()
-
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 interfaceGeoCoding
- Parameters:
geoPos
- the true (corrected) geographical coordinate as lat/lon.pixelPos
- an instance ofPoint
to be used as return value. If this parameter isnull
, 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 interfaceGeoCoding
- Parameters:
pixelPos
- the pixel coordinate given as x,ygeoPos
- an instance ofGeoPos
to be used as return value. If this parameter isnull
, 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 interfaceGeoCoding
- 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 interfaceGeoCoding
- 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 interfaceGeoCoding
- Returns:
true
, if so
-
clone
public GeoCoding clone()
Creates a shallow clone of this geocoding. Geolocation raster data is shared.
-
canClone
public boolean canClone()
Check if geocoding can be cloned.
-
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.
-
isPixelPosValid
protected final boolean isPixelPosValid(PixelPos pixelPos)
-
-