Class ALcdRasterTerrainElevationProvider
- All Implemented Interfaces:
ILcdAltitudeProvider
- Direct Known Subclasses:
ALcdModelBasedTerrainElevationProvider
,TLcdViewBasedTerrainElevationProvider
- Since:
- 6.2
-
Constructor Summary
ModifierConstructorDescriptionprotected
Defines anALcdTerrainElevationProvider
which adds raster value checking. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the maximal raster value that is accepted when retrieving elevation data.int
Returns the minimal raster value that is accepted when retrieving elevation data.double
Returns the value that will be returned if no elevation can be found for the queried point.double
Returns the value that will be returned when the elevation is unknown.boolean
isValidRasterValue
(int aRasterValue) Determines whether the given raster valueaRasterValue
lies within the interval [ getMinimumValidRasterValue() , getMaximumValidRasterValue() ].void
setMaximumValidRasterValue
(int aMaximumValidRasterValue) Sets the maximal raster value that will be accepted when retrieving elevation data.void
setMinimumValidRasterValue
(int aMinimumValidRasterValue) Sets the minimal raster value that will be accepted when retrieving elevation data.void
setOutOfRasterBoundsValue
(double aOutOfRasterBoundsValue) Sets the value that will be returned if no elevation can be found for the queried point.void
setUnknownElevation
(double aUnknownElevation) Sets the value that will be returned when the elevation is unknown.Methods inherited from class com.luciad.tea.ALcdTerrainElevationProvider
getAltitudeDescriptor, getAltitudeMode, getPreferredReference, isValidElevation, retrieveAltitudeAt, retrieveElevationAt
-
Constructor Details
-
ALcdRasterTerrainElevationProvider
protected ALcdRasterTerrainElevationProvider()Defines anALcdTerrainElevationProvider
which adds raster value checking.
-
-
Method Details
-
setUnknownElevation
public void setUnknownElevation(double aUnknownElevation) Sets the value that will be returned when the elevation is unknown. A value is set to be unknown if the corresponding raster value lies outside the interval [ getMinimumValidRasterValue() , getMaximumValidRasterValue() ]. By default, this is set to
Double.NaN
.Note that the altitude descriptor of this instance will be updated if the given elevation value is not a special value yet. If it is, the altitude descriptor will remain unchanged. The property corresponds to the altitude interpretation
UNKNOWN_ELEVATION
.- Parameters:
aUnknownElevation
- the value for data outside the valid raster interval.- See Also:
-
getUnknownElevation
public double getUnknownElevation()Returns the value that will be returned when the elevation is unknown.- Returns:
- the value that will be returned when the elevation is unknown.
- See Also:
-
setOutOfRasterBoundsValue
public void setOutOfRasterBoundsValue(double aOutOfRasterBoundsValue) Sets the value that will be returned if no elevation can be found for the queried point. This can happen if a point is chosen outside the bounds of the elevation raster data. By default, this is set to
Double.NaN
.Note that the altitude descriptor of this instance will be updated if the given elevation value is not a special value yet. If it is, the altitude descriptor will remain unchanged. The property corresponds to the altitude interpretation
OUTSIDE_RASTER_BOUNDS
.- Parameters:
aOutOfRasterBoundsValue
- the value for points outside the raster bounds.- See Also:
-
getOutOfRasterBoundsValue
public double getOutOfRasterBoundsValue()Returns the value that will be returned if no elevation can be found for the queried point. This can happen if a point is chosen outside the bounds of the elevation raster data.- Returns:
- the value for points outside the raster bounds.
- See Also:
-
setMinimumValidRasterValue
public void setMinimumValidRasterValue(int aMinimumValidRasterValue) Sets the minimal raster value that will be accepted when retrieving elevation data.- Parameters:
aMinimumValidRasterValue
- the minimum valid raster value.- See Also:
-
getMinimumValidRasterValue
public int getMinimumValidRasterValue()Returns the minimal raster value that is accepted when retrieving elevation data. If a smaller value is found, the unknown elevation value is used.- Returns:
- the minimum valid raster value.
- See Also:
-
setMaximumValidRasterValue
public void setMaximumValidRasterValue(int aMaximumValidRasterValue) Sets the maximal raster value that will be accepted when retrieving elevation data.- Parameters:
aMaximumValidRasterValue
- the maximum valid raster value.- See Also:
-
getMaximumValidRasterValue
public int getMaximumValidRasterValue()Returns the maximal raster value that is accepted when retrieving elevation data. If a larger value is found, the unknown elevation value is used.- Returns:
- the maximum valid raster value.
- See Also:
-
isValidRasterValue
public boolean isValidRasterValue(int aRasterValue) Determines whether the given raster valueaRasterValue
lies within the interval [ getMinimumValidRasterValue() , getMaximumValidRasterValue() ].- Parameters:
aRasterValue
- the raster value to check.- Returns:
- true if the raster value is valid, false otherwise.
-