Package org.esa.snap.core.datamodel
Class GcpGeoCoding
java.lang.Object
org.esa.snap.core.datamodel.AbstractGeoCoding
org.esa.snap.core.datamodel.GcpGeoCoding
- All Implemented Interfaces:
GeoCoding
Ground control point (GCP) geo-coding.
- Version:
- $Revision$ $Date$
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumClass representing the approximation methods used for the GCP geo-coding. -
Constructor Summary
ConstructorsConstructorDescriptionGcpGeoCoding(GcpGeoCoding.Method method, double[] x, double[] y, double[] lons, double[] lats, int sceneWidth, int sceneHeight, Datum datum) Constructs a new instance of this class.GcpGeoCoding(GcpGeoCoding.Method method, Placemark[] gcps, int sceneWidth, int sceneHeight, Datum datum) Constructs a new instance of this class. -
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.Returns the latitude and longitude value for a given pixel co-ordinate.Returns the approximation method used for this geo-coding.getPixelPos(GeoPos geoPos, PixelPos pixelPos) Returns the pixel co-ordinates as x/y for a given geographical position given as lat/lon.doubleReturns the root mean square error (RMSE) of the latitude approximation.doubleReturns the root mean square error (RMSE) of the longitude approximation.inthashCode()booleanChecks whether or not the longitudes of this geo-coding cross the +/- 180 degree meridian.voidvoidsetOriginalGeoCoding(GeoCoding geoCoding) booleantransferGeoCoding(Scene sourceScene, Scene targetScene, ProductSubsetDef subsetDef) Methods inherited from class org.esa.snap.core.datamodel.AbstractGeoCoding
createImageCRS, getGeoCRS, getImageCRS, getImageToMapTransform, getMapCRS, setGeoCRS, setImageCRS, setMapCRS
-
Constructor Details
-
GcpGeoCoding
public GcpGeoCoding(GcpGeoCoding.Method method, Placemark[] gcps, int sceneWidth, int sceneHeight, Datum datum) Constructs a new instance of this class.- Parameters:
method- the approximation method.gcps- the ground control points.sceneWidth- the scene width.sceneHeight- the scene height.datum- the datum.
-
GcpGeoCoding
public GcpGeoCoding(GcpGeoCoding.Method method, double[] x, double[] y, double[] lons, double[] lats, int sceneWidth, int sceneHeight, Datum datum) Constructs a new instance of this class.- Parameters:
method- the approximation method.x- the x coordinates.y- the y coordinates.lons- the longitudes.lats- the latitudes.sceneWidth- the scene width.sceneHeight- the scene height.datum- the datum.
-
-
Method Details
-
transferGeoCoding
- Specified by:
transferGeoCodingin classAbstractGeoCoding- Parameters:
sourceScene- the source scenetargetScene- the destination scenesubsetDef- the definition of the subset, may benull- Returns:
- true, if the geo-coding could be transferred.
-
canClone
public boolean canClone()Description copied from class:AbstractGeoCodingCheck if geocoding can be cloned.- Specified by:
canClonein interfaceGeoCoding- Overrides:
canClonein classAbstractGeoCoding- Returns:
- if so or not
-
clone
Description copied from class:AbstractGeoCodingCreates a shallow clone of this geocoding. Geolocation raster data is shared.- Specified by:
clonein interfaceGeoCoding- Overrides:
clonein classAbstractGeoCoding- Returns:
- the cloned geocoding
-
isCrossingMeridianAt180
public boolean isCrossingMeridianAt180()Checks whether or not the longitudes of this geo-coding cross the +/- 180 degree meridian.- Returns:
true, if so
-
canGetPixelPos
public boolean canGetPixelPos()Checks whether or not this geo-coding can determine the pixel position from a geodetic position.- Returns:
true, if so
-
canGetGeoPos
public boolean canGetGeoPos()Checks whether or not this geo-coding can determine the geodetic position from a pixel position.- Returns:
true, if so
-
getPixelPos
Returns the pixel co-ordinates as x/y for a given geographical position given as lat/lon.- Parameters:
geoPos- the geographical position as lat/lon in the coordinate system determined byGeoCoding.getGeoCRS()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 pixel co-ordinates as x/y
-
getGeoPos
Returns the latitude and longitude value for a given pixel co-ordinate.- Parameters:
pixelPos- the pixel's co-ordinates 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 geographical position as lat/lon in the coordinate system determined by
GeoCoding.getGeoCRS()
-
getDatum
Gets the datum, the reference point or surface against whichGeoPosmeasurements are made.- Returns:
- the datum
-
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. -
getRmseLon
public double getRmseLon()Returns the root mean square error (RMSE) of the longitude approximation.- Returns:
- the longitude RMSE.
-
getRmseLat
public double getRmseLat()Returns the root mean square error (RMSE) of the latitude approximation.- Returns:
- the latitude RMSE.
-
getMethod
Returns the approximation method used for this geo-coding.- Returns:
- the approximation method.
-
getOriginalGeoCoding
-
setOriginalGeoCoding
-
setGcps
-