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
ConstructorsConstructorDescriptionTLcdCompositeModelHeightProviderFactory(List<? extends ILcdModelHeightProviderFactory> aFactories) Creates aTLcdCompositeModelHeightProviderFactorywith a given list ofILcdModelHeightProviderFactoryinstances. -
Method Summary
-
Constructor Details
-
TLcdCompositeModelHeightProviderFactory
public TLcdCompositeModelHeightProviderFactory(List<? extends ILcdModelHeightProviderFactory> aFactories) Creates aTLcdCompositeModelHeightProviderFactorywith a given list ofILcdModelHeightProviderFactoryinstances.- Parameters:
aFactories- a list ofILcdModelHeightProviderFactorys.
-
-
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:ILcdModelHeightProviderFactoryReturns a height provider for a givenILcdModelusing the given properties. The returned height provider is determined by the implementation, theILcdModeland the given properties.- Specified by:
createHeightProviderin interfaceILcdModelHeightProviderFactory- Parameters:
aModel- anILcdModelfor which a height provider is created.aRequiredProperties- the required properties. The properties can be retrieved using aStringkey describing the property type. When not all required properties are used, an exception is thrown.aRequiredPropertiesmay 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 theILcdHeightProvideris 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 aStringkey describing the property type. The optional properties may or may not be used by the implementation.aOptionalPropertiesmay be empty but should not be null.- Returns:
- a height provider if elevation is supported, or
nullwhen 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:
-