Package com.luciad.util.height
Class TLcdCompositeModelHeightProviderFactory
java.lang.Object
com.luciad.util.height.TLcdCompositeModelHeightProviderFactory
- All Implemented Interfaces:
ILcdModelHeightProviderFactory
public class TLcdCompositeModelHeightProviderFactory
extends Object
implements ILcdModelHeightProviderFactory
This
ILcdModelHeightProviderFactory
tries to create an
ILcdHeightProvider
using a given list of other
ILcdModelHeightProviderFactory
instances. The first
ILcdModelHeightProviderFactory
that creates a height provider
prevails.
Sample code
A class that requires a height provider based on a different types of models could construct a suitable factory as follows:
// Create a list of height provider factories that may be relevant
// for different models and different properties.
List<ILcdModelHeightProviderFactory> factories = new ArrayList<ILcdModelHeightProviderFactory>();
factories.add(new TLcdRasterModelHeightProviderFactory());
...
// Create a composite height provider factory.
ILcdModelHeightProviderFactory factory =
new TLcdCompositeModelHeightProviderFactory(factories);
- Since:
- 9.1
-
Field Summary
Fields inherited from interface com.luciad.util.height.ILcdModelHeightProviderFactory
KEY_GEO_REFERENCE
-
Constructor Summary
ConstructorDescriptionTLcdCompositeModelHeightProviderFactory
(List<? extends ILcdModelHeightProviderFactory> aFactories) Creates aTLcdCompositeModelHeightProviderFactory
with a given list ofILcdModelHeightProviderFactory
instances. -
Method Summary
-
Constructor Details
-
TLcdCompositeModelHeightProviderFactory
public TLcdCompositeModelHeightProviderFactory(List<? extends ILcdModelHeightProviderFactory> aFactories) Creates aTLcdCompositeModelHeightProviderFactory
with a given list ofILcdModelHeightProviderFactory
instances.- Parameters:
aFactories
- a list ofILcdModelHeightProviderFactory
s.
-
-
Method Details
-
getModelHeightProviderFactories
Returns the list of height providers that this factory uses.- Returns:
- an unmodifiable list of height providers used by this factory.
-
createHeightProvider
public ILcdHeightProvider createHeightProvider(ILcdModel aModel, Map<String, Object> aRequiredProperties, Map<String, throws TLcdMissingPropertyException, TLcdUnsupportedPropertyExceptionObject> aOptionalProperties) Description copied from interface:ILcdModelHeightProviderFactory
Returns a height provider for a givenILcdModel
using the given properties. The returned height provider is determined by the implementation, theILcdModel
and the given properties.- Specified by:
createHeightProvider
in interfaceILcdModelHeightProviderFactory
- Parameters:
aModel
- anILcdModel
for which a height provider is created.aRequiredProperties
- the required properties. The properties can be retrieved using aString
key describing the property type. When not all required properties are used, an exception is thrown.aRequiredProperties
may be empty but should not benull
. When an implementation of this interface uses a required property, it should always remove it from the list of required properties. When theILcdHeightProvider
is actually made, implementations should verify that the list of required properties is empty (and all required properties are used).aOptionalProperties
- the optional properties. The properties can be retrieved using aString
key describing the property type. The optional properties may or may not be used by the implementation.aOptionalProperties
may be empty but should not be null.- Returns:
- a height provider if elevation is supported, or
null
when elevation is not supported or when no valid height provider can be created. - Throws:
TLcdMissingPropertyException
- when the implementation misses a necessary property.TLcdUnsupportedPropertyException
- when a required property is not used by the implementation.- See Also:
-