Package com.luciad.util.height
Class TLcdCompositeHeightProvider
java.lang.Object
com.luciad.util.height.TLcdCompositeHeightProvider
- All Implemented Interfaces:
ILcdBounded
,ILcdHeightProvider
This height provider combines a list of height providers. These height providers must
all have the same reference, which is also the reference of this height provider. Height
providers may have overlapping bounds. In such cases, the first height provider that
returns a valid height prevails.
- Since:
- 9.1
-
Constructor Summary
ConstructorDescriptionTLcdCompositeHeightProvider
(ILcdHeightProvider[] aHeightProviders) Creates aTLcdCompositeHeightProvider
using an array ofILcdHeightProvider
s.TLcdCompositeHeightProvider
(List<? extends ILcdHeightProvider> aHeightProviders) Creates aTLcdCompositeHeightProvider
using a list ofILcdHeightProvider
s. -
Method Summary
Modifier and TypeMethodDescriptionstatic ILcdHeightProvider
createCompositeHeightProvider
(ILcdHeightProvider[] aHeightProviders) Creates a compositeILcdHeightProvider
from an array of height providers.static ILcdHeightProvider
createCompositeHeightProvider
(List<? extends ILcdHeightProvider> aHeightProviderList) Creates a compositeILcdHeightProvider
from a list of height providers.Returns theILcdBounds
by which the geometry of thisILcdBounded
object is bounded.Returns a list ofILcdHeightProvider
s used in this composite height provider.double
retrieveHeightAt
(ILcdPoint aPoint) Returns the height at the given point.
-
Constructor Details
-
TLcdCompositeHeightProvider
Creates aTLcdCompositeHeightProvider
using an array ofILcdHeightProvider
s.Note that the static factory method
createCompositeHeightProvider(ILcdHeightProvider[])
may create a more efficient height provider, because it avoids creating a composite height provider with only a single element.- Parameters:
aHeightProviders
- an array ofILcdHeightProvider
s.
-
TLcdCompositeHeightProvider
Creates aTLcdCompositeHeightProvider
using a list ofILcdHeightProvider
s.Note that the static factory method
createCompositeHeightProvider(List)
may create a more efficient height provider, because it avoids creating a composite height provider with only a single element.- Parameters:
aHeightProviders
- a list ofILcdHeightProvider
s.
-
-
Method Details
-
getHeightProviders
Returns a list ofILcdHeightProvider
s used in this composite height provider. Modifying this list doesn't affect the composite height provider.- Returns:
- the list of
ILcdHeightProvider
s.
-
createCompositeHeightProvider
public static ILcdHeightProvider createCompositeHeightProvider(List<? extends ILcdHeightProvider> aHeightProviderList) Creates a compositeILcdHeightProvider
from a list of height providers.- Parameters:
aHeightProviderList
- a list of height providers.- Returns:
- a composite
ILcdHeightProvider
when the list contains more than 1 height provider. When the list contains only 1ILcdHeightProvider
, this height provider is returned. When the list is empty, null is returned.
-
createCompositeHeightProvider
public static ILcdHeightProvider createCompositeHeightProvider(ILcdHeightProvider[] aHeightProviders) Creates a compositeILcdHeightProvider
from an array of height providers.- Parameters:
aHeightProviders
- an array of height providers.- Returns:
- a composite
ILcdHeightProvider
when the array contains more than 1 height provider. When the array contains only 1ILcdHeightProvider
, this height provider is returned. When the array has length 0, null is returned.
-
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.
-