public abstract class ALcdRasterTerrainElevationProvider extends ALcdTerrainElevationProvider
Modifier | Constructor and Description |
---|---|
protected |
ALcdRasterTerrainElevationProvider()
Defines an
ALcdTerrainElevationProvider which adds raster
value checking. |
Modifier and Type | Method and Description |
---|---|
int |
getMaximumValidRasterValue()
Returns the maximal raster value that is accepted when retrieving elevation
data.
|
int |
getMinimumValidRasterValue()
Returns the minimal raster value that is accepted when retrieving elevation
data.
|
double |
getOutOfRasterBoundsValue()
Returns the value that will be returned if no elevation can be found for the queried
point.
|
double |
getUnknownElevation()
Returns the value that will be returned when the elevation is unknown.
|
boolean |
isValidRasterValue(int aRasterValue)
Determines whether the given raster value
aRasterValue 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.
|
getAltitudeDescriptor, getAltitudeMode, getPreferredReference, isValidElevation, retrieveAltitudeAt, retrieveElevationAt
protected ALcdRasterTerrainElevationProvider()
ALcdTerrainElevationProvider
which adds raster
value checking.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
.
aUnknownElevation
- the value for data outside the valid raster interval.getUnknownElevation()
public double getUnknownElevation()
setUnknownElevation(double)
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
.
aOutOfRasterBoundsValue
- the value for points outside the raster bounds.getOutOfRasterBoundsValue()
public double getOutOfRasterBoundsValue()
setOutOfRasterBoundsValue(double)
public void setMinimumValidRasterValue(int aMinimumValidRasterValue)
aMinimumValidRasterValue
- the minimum valid raster value.getMinimumValidRasterValue()
public int getMinimumValidRasterValue()
setMinimumValidRasterValue(int)
public void setMaximumValidRasterValue(int aMaximumValidRasterValue)
aMaximumValidRasterValue
- the maximum valid raster value.getMaximumValidRasterValue()
public int getMaximumValidRasterValue()
setMaximumValidRasterValue(int)
public boolean isValidRasterValue(int aRasterValue)
aRasterValue
lies within
the interval [ getMinimumValidRasterValue() , getMaximumValidRasterValue() ].aRasterValue
- the raster value to check.