Class ALcdTerrainElevationProvider

java.lang.Object
com.luciad.tea.ALcdTerrainElevationProvider
All Implemented Interfaces:
ILcdAltitudeProvider
Direct Known Subclasses:
ALcdRasterTerrainElevationProvider, TLcdHeightProviderAdapter

public abstract class ALcdTerrainElevationProvider extends Object implements ILcdAltitudeProvider

Provides terrain elevation data. All terrain elevation analysis classes that require terrain elevation data should retrieve the data through this implementation. Different strategies for retrieving terrain data can then seamlessly be plugged into the terrain elevation analysis classes by replacing the ALcdTerrainElevationProvider implementation.

The altitude or elevation values, provided by implementations of this class, are defined in meters above geoid. Special values should be interpreted as defined by the altitude descriptor (from getAltitudeDescriptor()). Keep in mind that Double.NaN, Double.NEGATIVE_INFINITY and Double.POSITIVE_INFINITY can also be used as special values.

The following image gives a visual explanation of this altitude provider. The green lines denotes the altitudes path that results from this provider.
Terrain altitude provider
  • Constructor Details

    • ALcdTerrainElevationProvider

      protected ALcdTerrainElevationProvider()
      Defines an ILcdAltitudeProvider that returns terrain elevation values above the geoid from the specified location reference.
  • Method Details

    • retrieveElevationAt

      public abstract double retrieveElevationAt(ILcdPoint aPoint, ILcdGeoReference aPointReference)
      Returns the elevation for a given location, defined in meters above the geoid from the given location reference.

      Special elevation values should be interpreted as defined by the altitude descriptor (from getAltitudeDescriptor()). Keep in mind that Double.NaN, Double.NEGATIVE_INFINITY and Double.POSITIVE_INFINITY can also be used as special values.

      Parameters:
      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.
      Returns:
      the elevation for a given location, defined in meters above the ellipsoid.
    • retrieveAltitudeAt

      public double retrieveAltitudeAt(ILcdPoint aPoint, ILcdGeoReference aPointReference)

      Returns the altitude in meters for the specified point. The representation of this value is defined by the altitude mode (from ILcdAltitudeProvider.getAltitudeMode()) and the altitude descriptor (from ILcdAltitudeProvider.getAltitudeDescriptor()).

      If no altitude value can be found for the specified point, the provider should return a value with an appropriate interpretation. For example, when a point is chosen outside the bounds of the elevation raster data, the value corresponding to the interpretation OUTSIDE_RASTER_BOUNDS can be returned.

      This implementations calls the method retrieveElevationAt(ILcdPoint, ILcdGeoReference) to retrieve the altitude value for the given location.

      Specified by:
      retrieveAltitudeAt in interface ILcdAltitudeProvider
      Parameters:
      aPoint - The location for which to retrieve the altitude.
      aPointReference - The reference in which the point is defined.
      Returns:
      the altitude in meters for the specified point.
    • getPreferredReference

      public ILcdGeoReference getPreferredReference()
      Returns the preferred reference for this terrain elevation provider. This reference is the reference with the best performance when used as a parameter in the method 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.

      Specified by:
      getPreferredReference in interface ILcdAltitudeProvider
      Returns:
      the preferred reference of this terrain elevation provider. Note that null can be returned if no preferred reference is available.
      See Also:
    • getAltitudeDescriptor

      public TLcdAltitudeDescriptor getAltitudeDescriptor()
      Description copied from interface: ILcdAltitudeProvider
      Returns the descriptor which describes how to interpret the altitude values.
      Specified by:
      getAltitudeDescriptor in interface ILcdAltitudeProvider
      Returns:
      the descriptor which describes how to interpret the altitude values.
    • getAltitudeMode

      public TLcdCoverageAltitudeMode getAltitudeMode()
      Returns TLcdCoverageAltitudeMode.ABOVE_GEOID. All altitudes returned by this provider should be interpreted as defined above the geoid of the specified location reference.
      Specified by:
      getAltitudeMode in interface ILcdAltitudeProvider
      Returns:
      TLcdCoverageAltitudeMode.ABOVE_GEOID.
    • isValidElevation

      public boolean isValidElevation(double aElevation)

      Determines whether the given elevation is valid. This implementation returns false if the elevation is a special value according to the altitude descriptor.

      Parameters:
      aElevation - the elevation to check.
      Returns:
      true if the elevation is valid, false otherwise.