public class TLcdDensityBasedRasterElevationProvider extends ALcdModelBasedTerrainElevationProvider
setPixelDensity
.
Note that the pixel density only makes sense with respect to a certain reference. By default, this
reference is a standard geodetic reference. This means pixel densities are given in pixels per
square degree. The reference can be changed by setPixelDensityReference
.
This class should NOT be used by multiple threads at the same time!
Constructor and Description |
---|
TLcdDensityBasedRasterElevationProvider()
Defines an
ALcdModelBasedTerrainElevationProvider which retrieves
elevation values from the raster with the pixel density closest to the desired
pixel density. |
Modifier and Type | Method and Description |
---|---|
void |
addModel(ILcdModel aModel)
Add a model to the list of models to be taken into account for retrieving
elevation data.
|
static double |
computePixelDensityFromDistanceDelta(double aDistanceDelta,
boolean aMeters)
Computes a pixel density value from a given distance (pixel width).
|
double |
getPixelDensity()
Gets the pixel density value.
|
ILcdGeoReference |
getPixelDensityReference()
Gets the reference in which the pixel density is defined.
|
static boolean |
isClassTraceOn()
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
removeAllModels()
Empty the list of models to be taken into account for retrieving elevation data.
|
void |
removeModel(ILcdModel aModel)
Remove a model from list set of models to be taken into account for retrieving
elevation data.
|
double |
retrieveElevationAt(ILcdPoint aModelPoint,
ILcdGeoReference aModelPointReference)
Returns the elevation for a given location, defined in meters above the geoid
from the given location reference.
|
static void |
setClassTraceOn(boolean aClassTraceOn)
Deprecated.
This method has been deprecated. It is recommended to use the
standard Java logging framework directly.
|
void |
setPixelDensity(double aPixelDensity)
Set the pixel density value.
|
void |
setPixelDensityReference(ILcdGeoReference aPixelDensityReference)
Set the reference in which the pixel density is defined.
|
protected double |
transformPixelDensity(double aPixelDensity,
ILcdGeoReference aSourceReference,
ILcdGeoReference aDestinationReference)
Transforms a pixel density in aSourceReference to a pixel density in aDestinationReference.
|
getModel, getModelCount, getPreferredReference
getMaximumValidRasterValue, getMinimumValidRasterValue, getOutOfRasterBoundsValue, getUnknownElevation, isValidRasterValue, setMaximumValidRasterValue, setMinimumValidRasterValue, setOutOfRasterBoundsValue, setUnknownElevation
getAltitudeDescriptor, getAltitudeMode, isValidElevation, retrieveAltitudeAt
public TLcdDensityBasedRasterElevationProvider()
ALcdModelBasedTerrainElevationProvider
which retrieves
elevation values from the raster with the pixel density closest to the desired
pixel density.public double retrieveElevationAt(ILcdPoint aModelPoint, ILcdGeoReference aModelPointReference)
ALcdTerrainElevationProvider.getAltitudeDescriptor()
). Keep in mind that Double.NaN
,
Double.NEGATIVE_INFINITY
and Double.POSITIVE_INFINITY
can
also be used as special values.
This implementations uses the raster with the pixel density closest to the desired pixel density to retrieve the altitude value for the given location.
retrieveElevationAt
in class ALcdTerrainElevationProvider
aModelPoint
- The point indicating the location for which to retrieve the elevation.aModelPointReference
- 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 void addModel(ILcdModel aModel)
ALcdModelBasedTerrainElevationProvider
addModel
in class ALcdModelBasedTerrainElevationProvider
aModel
- The model to be added.public void removeModel(ILcdModel aModel)
ALcdModelBasedTerrainElevationProvider
removeModel
in class ALcdModelBasedTerrainElevationProvider
aModel
- The model to be removed.public void removeAllModels()
ALcdModelBasedTerrainElevationProvider
removeAllModels
in class ALcdModelBasedTerrainElevationProvider
public ILcdGeoReference getPixelDensityReference()
setPixelDensityReference(ILcdGeoReference)
public void setPixelDensityReference(ILcdGeoReference aPixelDensityReference)
aPixelDensityReference
- The pixel density reference.getPixelDensityReference()
public double getPixelDensity()
setPixelDensity(double)
public void setPixelDensity(double aPixelDensity)
aPixelDensity
- The pixel density.getPixelDensity()
protected double transformPixelDensity(double aPixelDensity, ILcdGeoReference aSourceReference, ILcdGeoReference aDestinationReference)
aPixelDensity
- The original pixel density to be transformed.aSourceReference
- The reference system of the original pixel density.aDestinationReference
- The reference system of the transformed pixel density.public static double computePixelDensityFromDistanceDelta(double aDistanceDelta, boolean aMeters)
aDistanceDelta
- The distance value or pixel width.aMeters
- True if the distance is in meters.@Deprecated public static boolean isClassTraceOn()
true
if tracing is enabled for this class.@Deprecated public static void setClassTraceOn(boolean aClassTraceOn)
true
then all log messages are recorded, otherwise only
the informative, warning and error messages are recorded.aClassTraceOn
- if true then all log messages are recorded,
otherwise only the informative, warning and error messages are recorded.