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
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$
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOrthorectifier(int sceneRasterWidth, int sceneRasterHeight, Pointing pointing, ElevationModel elevationModel, int maxIterationCount) Constructs a newOrthorectifier. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanClone()Check if geocoding can be cloned.booleanChecks whether or not this geo-coding can determine the geodetic position from a pixel position.booleanChecks whether or not this geo-coding can determine the pixel position from a geodetic position.clone()Creates a shallow clone of this geocoding.voiddispose()Releases all of the resources used by this object instance and all of its owned children.booleangetDatum()Gets the datum, the reference point or surface against whichGeoPosmeasurements are made.protected final doublegetElevation(GeoPos geoPos, PixelPos pixelPos) org.opengis.referencing.crs.CoordinateReferenceSystemGets the true (corrected) geographical coordinate for a given source pixel coordinate.org.opengis.referencing.crs.CoordinateReferenceSystemorg.opengis.referencing.operation.MathTransformorg.opengis.referencing.crs.CoordinateReferenceSystemintgetPixelPos(GeoPos geoPos, PixelPos pixelPos) Returns the source pixel coordinate for a true (corrected) geographical coordinate.inthashCode()booleanChecks whether or not the longitudes of this geo-coding cross the +/- 180 degree meridian.protected final booleanisPixelPosValid(PixelPos pixelPos)
-
Field Details
-
PIXEL_EPS
public static final float PIXEL_EPS- See Also:
-
PIXEL_EPS_SQR
public static final float PIXEL_EPS_SQR- See Also:
-
-
Constructor Details
-
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 Details
-
getDatum
Gets the datum, the reference point or surface against whichGeoPosmeasurements are made. -
getImageCRS
public org.opengis.referencing.crs.CoordinateReferenceSystem getImageCRS()- Specified by:
getImageCRSin 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:
getImageToMapTransformin interfaceGeoCoding- Returns:
- The math transformation used to convert image coordinates to map coordinates.
-
getPointing
-
getGeoCoding
-
getElevationModel
-
getMaxIterationCount
public int getMaxIterationCount() -
getPixelPos
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:
getPixelPosin interfaceGeoCoding- Parameters:
geoPos- the true (corrected) geographical coordinate as lat/lon.pixelPos- an instance ofPointto 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
Gets the true (corrected) geographical coordinate for a given source pixel coordinate.- Specified by:
getGeoPosin interfaceGeoCoding- Parameters:
pixelPos- the pixel coordinate given as x,ygeoPos- an instance ofGeoPosto 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:
canGetGeoPosin 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:
canGetPixelPosin 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:
isCrossingMeridianAt180in interfaceGeoCoding- Returns:
true, if so
-
clone
Creates a shallow clone of this geocoding. Geolocation raster data is shared. -
canClone
public boolean canClone()Check if geocoding can be cloned. -
equals
-
hashCode
public int hashCode() -
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
-
getElevation
-