Package com.luciad.earth.util
Class ALcdEarthTerrainElevationProvider
java.lang.Object
com.luciad.earth.util.ALcdEarthTerrainElevationProvider
- Direct Known Subclasses:
TLcdEarthTerrainElevationProvider
,TLcdEarthTileSetElevationProvider
Provides elevation data. Given a 2D point, this class returns the elevation
of the terrain at that point, expressed in meters above mean sea level.
- Since:
- 8.2
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the preferred reference for this elevation provider.abstract double
retrieveElevationAt
(ILcdPoint aPoint, ILcdGeoReference aPointReference) Returns the elevation for a given location, defined in meters above mean sea level.double
retrieveElevationAt
(ILcdPoint aPoint, ILcdGeoReference aPointReference, double aDesiredResolution) Returns the elevation for a given location, defined in meters above mean sea level.
-
Constructor Details
-
ALcdEarthTerrainElevationProvider
public ALcdEarthTerrainElevationProvider()
-
-
Method Details
-
retrieveElevationAt
Returns the elevation for a given location, defined in meters above mean sea level. If the elevation cannot be determined, this method returns NaN.- Parameters:
aPoint
- The point indicating the location for which to retrieve the elevation.aPointReference
- The reference in which the given location is defined.- Returns:
- the elevation for a given location, defined in meters above mean sea level, or NaN when the elevation cannot be determined.
-
getPreferredReference
Returns the preferred reference for this elevation provider. This reference is the reference with the best performance when used as a parameter in the method
retrieveElevationAt(com.luciad.shape.ILcdPoint, com.luciad.reference.ILcdGeoReference)
. It is perfectly correct to use points with other references. It will be faster to use the preferred one.For performance reasons, the preferred reference should be the reference of the available elevation data to minimize the number of point transformations.
By default this method returns
null
, indicating that no preferred reference is available.- Returns:
- the preferred reference of this elevation provider. Note that this method
can return
null
if no preferred reference is available. - See Also:
-
retrieveElevationAt
public double retrieveElevationAt(ILcdPoint aPoint, ILcdGeoReference aPointReference, double aDesiredResolution) Returns the elevation for a given location, defined in meters above mean sea level. If the elevation cannot be determined, this method returns NaN. TheaDesiredResolution
parameter can be used to indicate to the elevation provider what the desired resolution of the elevation values should be. The value should be a distance measured in units of the point reference. If an application wants to request elevations for a grid of points which are 10 units apart, for instance, it could pass a value of 10.0 inaDesiredResolution
. The elevation provider could then optimize for this particular resolution, e.g. by choosing the appropriate detail level from a multileveled elevation raster. The default implementation of this method simply delegates toretrieveElevationAt(com.luciad.shape.ILcdPoint, com.luciad.reference.ILcdGeoReference)
and hence does not use theaDesiredResolution
parameter.- Parameters:
aPoint
- The point indicating the location for which to retrieve the elevation.aPointReference
- The reference in which the given location is defined.aDesiredResolution
- An indication of the spacing (in units of the point reference) between sample points for which elevations are being retrieved- Returns:
- the elevation for a given location, defined in meters above mean sea level, or NaN when the elevation cannot be determined.
-