Class ComponentGeoCoding
- java.lang.Object
-
- org.esa.snap.core.datamodel.AbstractGeoCoding
-
- org.esa.snap.core.dataio.geocoding.ComponentGeoCoding
-
- All Implemented Interfaces:
GeoCoding
public class ComponentGeoCoding extends AbstractGeoCoding
-
-
Field Summary
Fields Modifier and Type Field Description static String
SYSPROP_SNAP_PIXEL_CODING_FRACTION_ACCURACY
-
Constructor Summary
Constructors Constructor Description ComponentGeoCoding(GeoRaster geoRaster, ForwardCoding forwardCoding, InverseCoding inverseCoding)
Constructs a GeoCoding with given GeoRaster, ForwardCoding and InverseCoding.ComponentGeoCoding(GeoRaster geoRaster, ForwardCoding forwardCoding, InverseCoding inverseCoding, GeoChecks geoChecks)
Constructs a GeoCoding with given GeoRaster, ForwardCoding, InverseCoding and GeoCheck definition to be executed during initialize phase.ComponentGeoCoding(GeoRaster geoRaster, ForwardCoding forwardCoding, InverseCoding inverseCoding, GeoChecks geoChecks, org.opengis.referencing.crs.CoordinateReferenceSystem geoCRS)
Constructs a GeoCoding with given GeoRaster, ForwardCoding, InverseCoding, GeoChecks to be performed during initialization and CRS.ComponentGeoCoding(GeoRaster geoRaster, ForwardCoding forwardCoding, InverseCoding inverseCoding, org.opengis.referencing.crs.CoordinateReferenceSystem geoCRS)
Constructs a GeoCoding with given GeoRaster, ForwardCoding, InverseCoding and CRS.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated 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.Datum
getDatum()
Deprecated.use the datum of the associatedmap CRS
.ForwardCoding
getForwardCoding()
GeoChecks
getGeoChecks()
GeoPos
getGeoPos(PixelPos pixelPos, GeoPos geoPos)
Returns the latitude and longitude value for a given pixel co-ordinate.GeoRaster
getGeoRaster()
InverseCoding
getInverseCoding()
PixelPos
getPixelPos(GeoPos geoPos, PixelPos pixelPos)
Returns the pixel co-ordinates as x/y for a given geographical position given as lat/lon.void
initialize()
boolean
isCrossingMeridianAt180()
Checks whether or not the longitudes of this geo-coding cross the +/- 180 degree meridian.boolean
transferGeoCoding(Scene srcScene, Scene destScene, ProductSubsetDef subsetDef)
-
Methods inherited from class org.esa.snap.core.datamodel.AbstractGeoCoding
createImageCRS, getGeoCRS, getImageCRS, getImageToMapTransform, getMapCRS, setGeoCRS, setImageCRS, setMapCRS
-
-
-
-
Field Detail
-
SYSPROP_SNAP_PIXEL_CODING_FRACTION_ACCURACY
public static final String SYSPROP_SNAP_PIXEL_CODING_FRACTION_ACCURACY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ComponentGeoCoding
public ComponentGeoCoding(GeoRaster geoRaster, ForwardCoding forwardCoding, InverseCoding inverseCoding)
Constructs a GeoCoding with given GeoRaster, ForwardCoding and InverseCoding. No geoChecks will be performed during initialize phase. Defaults to WGS84 CRS. Forward and/or Inverse coding can be null.- Parameters:
geoRaster
- the GeoRasterforwardCoding
- the ForwardCoding, can be nullinverseCoding
- the InverseCoding, can be null
-
ComponentGeoCoding
public ComponentGeoCoding(GeoRaster geoRaster, ForwardCoding forwardCoding, InverseCoding inverseCoding, GeoChecks geoChecks)
Constructs a GeoCoding with given GeoRaster, ForwardCoding, InverseCoding and GeoCheck definition to be executed during initialize phase. Defaults to WGS84 CRS. Forward and/or Inverse coding can be null.- Parameters:
geoRaster
- the GeoRasterforwardCoding
- the ForwardCoding, can be nullinverseCoding
- the InverseCoding, can be nullgeoChecks
- definition of GeoChecks to be executed during initialization
-
ComponentGeoCoding
public ComponentGeoCoding(GeoRaster geoRaster, ForwardCoding forwardCoding, InverseCoding inverseCoding, org.opengis.referencing.crs.CoordinateReferenceSystem geoCRS)
Constructs a GeoCoding with given GeoRaster, ForwardCoding, InverseCoding and CRS. No GeoChecks will be performed during initialize phase. Forward and/or Inverse coding can be null.- Parameters:
geoRaster
- the GeoRasterforwardCoding
- the ForwardCoding, can be nullinverseCoding
- the InverseCoding, can be nullgeoCRS
- the CRS
-
ComponentGeoCoding
public ComponentGeoCoding(GeoRaster geoRaster, ForwardCoding forwardCoding, InverseCoding inverseCoding, GeoChecks geoChecks, org.opengis.referencing.crs.CoordinateReferenceSystem geoCRS)
Constructs a GeoCoding with given GeoRaster, ForwardCoding, InverseCoding, GeoChecks to be performed during initialization and CRS. Forward and/or Inverse coding can be null.- Parameters:
geoRaster
- the GeoRasterforwardCoding
- the ForwardCoding, can be nullinverseCoding
- the InverseCoding, can be nullgeoChecks
- definition of GeoChecks to be executed during initializationgeoCRS
- the CRS
-
-
Method Detail
-
isCrossingMeridianAt180
public boolean isCrossingMeridianAt180()
Description copied from interface:GeoCoding
Checks whether or not the longitudes of this geo-coding cross the +/- 180 degree meridian.- Returns:
true
, if so
-
canGetPixelPos
public boolean canGetPixelPos()
Description copied from interface:GeoCoding
Checks whether or not this geo-coding can determine the pixel position from a geodetic position.- Returns:
true
, if so
-
canGetGeoPos
public boolean canGetGeoPos()
Description copied from interface:GeoCoding
Checks whether or not this geo-coding can determine the geodetic position from a pixel position.- Returns:
true
, if so
-
getPixelPos
public PixelPos getPixelPos(GeoPos geoPos, PixelPos pixelPos)
Description copied from interface:GeoCoding
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 ofPoint
to 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
public GeoPos getGeoPos(PixelPos pixelPos, GeoPos geoPos)
Description copied from interface:GeoCoding
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 ofGeoPos
to 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()
-
transferGeoCoding
public boolean transferGeoCoding(Scene srcScene, Scene destScene, ProductSubsetDef subsetDef)
- Specified by:
transferGeoCoding
in classAbstractGeoCoding
- Parameters:
srcScene
- the source scenedestScene
- the destination scenesubsetDef
- the definition of the subset, may benull
- Returns:
- true, if the geo-coding could be transferred.
-
dispose
public void dispose()
Description copied from interface:GeoCoding
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.
-
getDatum
@Deprecated public Datum getDatum()
Deprecated.use the datum of the associatedmap CRS
.Gets the datum, the reference point or surface against whichGeoPos
measurements are made.- Returns:
- the datum
-
clone
public GeoCoding clone()
Description copied from class:AbstractGeoCoding
Creates a shallow clone of this geocoding. Geolocation raster data is shared.- Specified by:
clone
in interfaceGeoCoding
- Overrides:
clone
in classAbstractGeoCoding
- Returns:
- the cloned geocoding
-
canClone
public boolean canClone()
Description copied from class:AbstractGeoCoding
Check if geocoding can be cloned.- Specified by:
canClone
in interfaceGeoCoding
- Overrides:
canClone
in classAbstractGeoCoding
- Returns:
- if so or not
-
initialize
public void initialize()
-
getGeoChecks
public GeoChecks getGeoChecks()
-
getForwardCoding
public ForwardCoding getForwardCoding()
-
getInverseCoding
public InverseCoding getInverseCoding()
-
getGeoRaster
public GeoRaster getGeoRaster()
-
-