Package org.esa.snap.core.dataop.dem
Interface ElevationModel
- All Known Implementing Classes:
BaseElevationModel
public interface ElevationModel
An
ElevationModel is used to obtain an elevation above a
specified geographical datum for a given geographical position.-
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Releases all of the resources used by this object instance and all of its owned children.Gets the descriptor of this DEM.doublegetElevation(GeoPos geoPos) Gets the elevation at the geographical coordinate in meters.Gets the geographical coordinates for the input pixel coordinates in the DEM reference system.Gets the pixel index in the DEM reference system at the geographical coordinate in meters.doublegetSample(double x, double y) Gets the elevation at the point defined by (x,y) coordinates in DEM reference system.booleangetSamples(int[] x, int[] y, double[][] samples) Gets the elevations at the points defined by (x,y) coordinates in DEM reference system.
-
Method Details
-
getDescriptor
ElevationModelDescriptor getDescriptor()Gets the descriptor of this DEM.- Returns:
- the descriptor which is never null
-
getElevation
Gets the elevation at the geographical coordinate in meters.- Parameters:
geoPos- the geographical coordinate- Returns:
- an elevation in meters, or the special value returned by
ElevationModelDescriptor.getNoDataValue()if an elevation is not available - Throws:
Exception- if a non-runtime error occurs, e.g I/O error
-
getIndex
Gets the pixel index in the DEM reference system at the geographical coordinate in meters.- Parameters:
geoPos- the geographical coordinate- Returns:
- (x, y) coordinates in the reference system of a given DEM
- Throws:
Exception- if a non-runtime error occurs, e.g I/O error
-
getGeoPos
Gets the geographical coordinates for the input pixel coordinates in the DEM reference system.- Parameters:
pixelPos- the pixel (x,y) coordinate- Returns:
- (lat, lon) geographical coordinates in the reference system of a given DEM
- Throws:
Exception- if a non-runtime error occurs, e.g I/O error
-
getSample
Gets the elevation at the point defined by (x,y) coordinates in DEM reference system. This method does not interpolated the elevation map!- Parameters:
x- coordinatey- coordinate- Returns:
- an elevation in meters, or the special value returned by
ElevationModelDescriptor.getNoDataValue()if an elevation is not available - Throws:
Exception- if a non-runtime error occurs, e.g I/O error
-
getSamples
Gets the elevations at the points defined by (x,y) coordinates in DEM reference system. This method does not interpolated the elevation map!- Parameters:
x- coordinatey- coordinatesamples- output elevation in meters, or the special value returned byElevationModelDescriptor.getNoDataValue()if an elevation is not available- Returns:
- false if all values are nodata value
- Throws:
Exception- if a non-runtime error occurs, e.g I/O error
-
getResampling
Resampling getResampling()- Returns:
- The resampling method used.
- Since:
- BEAM 4.6
-
dispose
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.Overrides of this method should always call
super.dispose();after disposing this instance.
-