public class TLcdHeightProviderAdapter extends ALcdTerrainElevationProvider
ILcdHeightProvider
to implement the
ILcdAltitudeProvide
interface.Constructor and Description |
---|
TLcdHeightProviderAdapter(ILcdHeightProvider aHeightProvider,
ILcdGeoReference aReference)
Create en new
TLcdHeightProviderAdapter using the given
ILcdHeightProvider . |
Modifier and Type | Method and Description |
---|---|
ILcdGeoReference |
getPreferredReference()
Returns the preferred reference for this terrain elevation provider.
|
double |
retrieveElevationAt(ILcdPoint aPoint,
ILcdGeoReference aPointReference)
Returns the elevation for a given location, defined in meters above the geoid
from the given location reference.
|
getAltitudeDescriptor, getAltitudeMode, isValidElevation, retrieveAltitudeAt
public TLcdHeightProviderAdapter(ILcdHeightProvider aHeightProvider, ILcdGeoReference aReference)
TLcdHeightProviderAdapter
using the given
ILcdHeightProvider
.aHeightProvider
- the ILcdHeightProvider
to be wrapped.aReference
- the reference in which the ILcdHeightProvider
is defined.public double retrieveElevationAt(ILcdPoint aPoint, ILcdGeoReference aPointReference)
ALcdTerrainElevationProvider
ALcdTerrainElevationProvider.getAltitudeDescriptor()
). Keep in mind that Double.NaN
,
Double.NEGATIVE_INFINITY
and Double.POSITIVE_INFINITY
can
also be used as special values.retrieveElevationAt
in class ALcdTerrainElevationProvider
aPoint
- The point indicating the location for which to retrieve the elevation.aPointReference
- The reference in which the given location is defined. Note that the
ellipsoid from this reference should be used to define the returning
elevation value.public ILcdGeoReference getPreferredReference()
ALcdTerrainElevationProvider
ALcdTerrainElevationProvider.retrieveElevationAt(ILcdPoint, ILcdGeoReference)
. It is perfectly correct to use points
with other references. It will be faster to use the preferred.
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
.
Keep in mind that this function can return null
if no preferred reference is
available.getPreferredReference
in interface ILcdAltitudeProvider
getPreferredReference
in class ALcdTerrainElevationProvider
null
can be returned if no preferred reference is available.ALcdTerrainElevationProvider.retrieveElevationAt(ILcdPoint,ILcdGeoReference)