Package com.luciad.util.height
Class ALcdModelHeightProviderFactory
java.lang.Object
com.luciad.util.height.ALcdModelHeightProviderFactory
- All Implemented Interfaces:
ILcdModelHeightProviderFactory
- Direct Known Subclasses:
ALcdRasterModelHeightProviderFactory
public abstract class ALcdModelHeightProviderFactory
extends Object
implements ILcdModelHeightProviderFactory
This abstract class provides a method to create an
ILcdHeightProvider
when an ILcdModel is given.- Since:
- 9.1
-
Field Summary
Fields inherited from interface com.luciad.util.height.ILcdModelHeightProviderFactory
KEY_GEO_REFERENCE -
Constructor Summary
ConstructorsConstructorDescriptionCreates a newTLcdModelHeightProviderFactory. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract booleancanCreateHeightProvider(ILcdModel aModel) Checks if a height provider can be created from the givenILcdModel.createHeightProvider(ILcdModel aModel, Map<String, Object> aRequiredPropertiesSFCT, Map<String, Object> aOptionalProperties) Returns a height provider for a givenILcdModelusing the given properties.protected abstract ILcdHeightProvidercreateModelElementHeightProvider(Object aElement, Map<String, Object> aRequiredPropertiesSFCT, Map<String, Object> aOptionalProperties) Creates anILcdHeightProviderfor the given model element.protected voidtransformProperties(ILcdModel aModel, ILcdGeoReference aFromReference, ILcdGeoReference aToReference, Map<String, Object> aRequiredPropertiesSFCT, Map<String, Object> aOptionalPropertiesSFCT) Transforms the properties in theTLcdHeightProviderProperties.
-
Constructor Details
-
ALcdModelHeightProviderFactory
public ALcdModelHeightProviderFactory()Creates a newTLcdModelHeightProviderFactory.
-
-
Method Details
-
createHeightProvider
public ILcdHeightProvider createHeightProvider(ILcdModel aModel, Map<String, Object> aRequiredPropertiesSFCT, 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.aRequiredPropertiesSFCT- 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:
-
transformProperties
protected void transformProperties(ILcdModel aModel, ILcdGeoReference aFromReference, ILcdGeoReference aToReference, Map<String, Object> aRequiredPropertiesSFCT, Map<String, throws TLcdOutOfBoundsExceptionObject> aOptionalPropertiesSFCT) Transforms the properties in theTLcdHeightProviderProperties. A height provider factory that extends this class should override this method if it defines extra properties that depend on the geo reference property. If this is the case, it should be possible to transform these properties toaToReference.- Parameters:
aModel- a model defined with respect toaToReference.aFromReference- the reference in which the properties are defined.aToReference- the reference to which the properties will be transformed.aRequiredPropertiesSFCT- the required properties.aOptionalPropertiesSFCT- the optional properties.- Throws:
TLcdOutOfBoundsException- when a property cannot be transformed correctly.
-
createModelElementHeightProvider
protected abstract ILcdHeightProvider createModelElementHeightProvider(Object aElement, Map<String, Object> aRequiredPropertiesSFCT, Map<String, throws TLcdMissingPropertyException, TLcdUnsupportedPropertyExceptionObject> aOptionalProperties) Creates anILcdHeightProviderfor the given model element.- Parameters:
aElement- a model element.aRequiredPropertiesSFCT- the required properties.aOptionalProperties- the optional properties.- Returns:
- an
ILcdHeightProviderfor the given model element ornullif noILcdHeightProvidercan be created. - Throws:
TLcdMissingPropertyException- when a property is missing that is necessary to create theILcdHeightProvider.TLcdUnsupportedPropertyException- when a required property was never used while creating theILcdHeightProvider.
-
canCreateHeightProvider
Checks if a height provider can be created from the givenILcdModel.- Parameters:
aModel- the given model.- Returns:
trueif a height provider can be created from the given model andfalseotherwise.
-