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
ConstructorsConstructorDescriptionTLcdCompositeHeightProvider(ILcdHeightProvider[] aHeightProviders) Creates aTLcdCompositeHeightProviderusing an array ofILcdHeightProviders.TLcdCompositeHeightProvider(List<? extends ILcdHeightProvider> aHeightProviders) Creates aTLcdCompositeHeightProviderusing a list ofILcdHeightProviders. -
Method Summary
Modifier and TypeMethodDescriptionstatic ILcdHeightProvidercreateCompositeHeightProvider(ILcdHeightProvider[] aHeightProviders) Creates a compositeILcdHeightProviderfrom an array of height providers.static ILcdHeightProvidercreateCompositeHeightProvider(List<? extends ILcdHeightProvider> aHeightProviderList) Creates a compositeILcdHeightProviderfrom a list of height providers.Returns theILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.Returns a list ofILcdHeightProviders used in this composite height provider.doubleretrieveHeightAt(ILcdPoint aPoint) Returns the height at the given point.
-
Constructor Details
-
TLcdCompositeHeightProvider
Creates aTLcdCompositeHeightProviderusing an array ofILcdHeightProviders.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 ofILcdHeightProviders.
-
TLcdCompositeHeightProvider
Creates aTLcdCompositeHeightProviderusing a list ofILcdHeightProviders.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 ofILcdHeightProviders.
-
-
Method Details
-
getHeightProviders
Returns a list ofILcdHeightProviders used in this composite height provider. Modifying this list doesn't affect the composite height provider.- Returns:
- the list of
ILcdHeightProviders.
-
createCompositeHeightProvider
public static ILcdHeightProvider createCompositeHeightProvider(List<? extends ILcdHeightProvider> aHeightProviderList) Creates a compositeILcdHeightProviderfrom a list of height providers.- Parameters:
aHeightProviderList- a list of height providers.- Returns:
- a composite
ILcdHeightProviderwhen 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 compositeILcdHeightProviderfrom an array of height providers.- Parameters:
aHeightProviders- an array of height providers.- Returns:
- a composite
ILcdHeightProviderwhen 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:ILcdHeightProviderReturns the height at the given point.- Specified by:
retrieveHeightAtin 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:ILcdBoundedReturns theILcdBoundsby which the geometry of thisILcdBoundedobject 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
undefinedbounds. You can create undefined bounds using the default constructors ofTLcdLonLatBoundsorTLcdXYBounds.- Specified by:
getBoundsin interfaceILcdBounded- Returns:
- the
ILcdBoundsby which the geometry of thisILcdBoundedobject is bounded.
-