Package com.luciad.util.height
Class TLcdImageHeightProvider
java.lang.Object
com.luciad.util.height.TLcdImageHeightProvider
- All Implemented Interfaces:
ILcdBounded
,ILcdHeightProvider
A height provider which can read values out of an ALcdBasicImage. The image
must be single-banded. This provider needs an ALcdImagingEngine to read
values out of the image. It can be
supplied externally
or the provider can
create its own.
This height provider takes the
sampling mode
of the image into account.
Assuming interpolation
is off:
- Point-sampled: the sample nearest to the requested coordinates is returned
- Area-sampled: the sample containing the requested coordinates is returned
- Since:
- 2014.0
-
Constructor Summary
ConstructorDescriptionCreate a new height provider.TLcdImageHeightProvider
(ALcdBasicImage aImage, ALcdImagingEngine aImagingEngine) Create a new height provider for a given image and imaging engine.TLcdImageHeightProvider
(ALcdBasicImage aImage, ALcdImagingEngine aImagingEngine, int aMinValidHeight, int aMaxValidHeight) Create a new height provider for a given image and imaging engine.TLcdImageHeightProvider
(ALcdImageMosaic aImageMosaic) Create a new height provider using a default imaging engine.TLcdImageHeightProvider
(ALcdImageMosaic aImageMosaic, ALcdImagingEngine aImagingEngine) Create a new height provider.TLcdImageHeightProvider
(ALcdImageMosaic aImageMosaic, ALcdImagingEngine aImagingEngine, int aMinValidHeight, int aMaxValidHeight) Create a new height provider. -
Method Summary
Modifier and TypeMethodDescriptionfinal ILcdBounds
Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.double
retrieveHeightAt
(ILcdPoint aPoint) Returns the height at the given point.void
setInterpolate
(boolean aInterpolate) Set whether height values should be interpolated.
-
Constructor Details
-
TLcdImageHeightProvider
Create a new height provider. Heights outside the range of -12000 to 10000 are returned as invalid (Double.NaN
).- Parameters:
aImage
- image to read elevation values from
-
TLcdImageHeightProvider
Create a new height provider for a given image and imaging engine. Heights outside the range of -12000 to 10000 are returned as invalid (Double.NaN
). If the given imaging engine isnull
, a default imaging engine will be used.- Parameters:
aImage
- image to read elevation values fromaImagingEngine
- imaging engine to use ornull
to use the default
-
TLcdImageHeightProvider
public TLcdImageHeightProvider(ALcdBasicImage aImage, ALcdImagingEngine aImagingEngine, int aMinValidHeight, int aMaxValidHeight) Create a new height provider for a given image and imaging engine. If the given imaging engine isnull
, a default imaging engine will be used.- Parameters:
aImage
- image to read elevation values fromaImagingEngine
- imaging engine to use ornull
to use the defaultaMinValidHeight
- the minimum valid heightaMaxValidHeight
- the maximum valid height
-
TLcdImageHeightProvider
Create a new height provider using a default imaging engine. Heights outside the range of -12000 to 10000 are returned as invalid (Double.NaN
).- Parameters:
aImageMosaic
- image mosaic to read elevation values from
-
TLcdImageHeightProvider
Create a new height provider. Heights outside the range of -12000 to 10000 are returned as invalid (Double.NaN
). If the given imaging engine isnull
, a default imaging engine will be used.- Parameters:
aImageMosaic
- image mosaic to read elevation values fromaImagingEngine
- imaging engine to use ornull
to use the default
-
TLcdImageHeightProvider
public TLcdImageHeightProvider(ALcdImageMosaic aImageMosaic, ALcdImagingEngine aImagingEngine, int aMinValidHeight, int aMaxValidHeight) Create a new height provider. If the given imaging engine isnull
, a default imaging engine will be used.- Parameters:
aImageMosaic
- image mosaic to read elevation values fromaImagingEngine
- imaging engine to use ornull
to use the defaultaMinValidHeight
- the minimum valid heightaMaxValidHeight
- the maximum valid height
-
-
Method Details
-
setInterpolate
public void setInterpolate(boolean aInterpolate) Set whether height values should be interpolated. By default, values are retrieved by nearest neighbor.- Parameters:
aInterpolate
- true if height values should be interpolated.
-
retrieveHeightAt
Description copied from interface:ILcdHeightProvider
Returns the height at the given point.- Specified by:
retrieveHeightAt
in interfaceILcdHeightProvider
- Parameters:
aPoint
- a 2D point, in the horizontal reference that is determined by the implementation.- Returns:
- the elevation at the given point, in the vertical reference that
is determined by the implementation. The value may also be
Double.NaN
, if the elevation is not known.
-
getBounds
Description copied from interface:ILcdBounded
Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points) the return value is unspecified. It is highly recommended to return an
undefined
bounds. You can create undefined bounds using the default constructors ofTLcdLonLatBounds
orTLcdXYBounds
.- Specified by:
getBounds
in interfaceILcdBounded
- Returns:
- the
ILcdBounds
by which the geometry of thisILcdBounded
object is bounded.
-