Package com.luciad.util.height
Class ALcdRasterModelHeightProviderFactory
java.lang.Object
com.luciad.util.height.ALcdModelHeightProviderFactory
com.luciad.util.height.ALcdRasterModelHeightProviderFactory
- All Implemented Interfaces:
ILcdModelHeightProviderFactory
- Direct Known Subclasses:
TLcdImageModelHeightProviderFactory,TLcdRasterModelHeightProviderFactory
This class provides the common interface and methods of both the legacy
TLcdRasterModelHeightProviderFactory and the new
TLcdImageModelHeightProviderFactory- Since:
- 2014.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringKey used to to denote that the raster data should be interpolated.static final StringKey for the maximum valid height of the returned height.static final StringKey for the minimum valid height of the returned height.static final StringKey used for a pixel density value.Fields inherited from interface com.luciad.util.height.ILcdModelHeightProviderFactory
KEY_GEO_REFERENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancanCreateHeightProvider(ILcdModel aModel) Check if a height provider can be created from the givenILcdModel.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> aRequiredProperties, Map<String, Object> aOptionalProperties) Transforms the properties in theTLcdHeightProviderProperties.Methods inherited from class com.luciad.util.height.ALcdModelHeightProviderFactory
createHeightProvider
-
Field Details
-
KEY_PIXEL_DENSITY
Key used for a pixel density value. The property should be a double. Pixel density is defined as the number of pixels in an image or raster per unit of area. The area should be expressed in function of the givenKEY_GEO_REFERENCEproperty. This property is used when the height provider is backed by multi-level data. It gives a hint to the implementation which level should be chosen. If this property is not provided, or set to Double.NaN, the most detailed level is chosen.- See Also:
-
KEY_MIN_VALID_HEIGHT
Key for the minimum valid height of the returned height. The property should be an integer.- See Also:
-
KEY_MAX_VALID_HEIGHT
Key for the maximum valid height of the returned height. The property should be an integer.- See Also:
-
KEY_INTERPOLATE_DATA
Key used to to denote that the raster data should be interpolated. The property should be a boolean.- See Also:
-
-
Constructor Details
-
ALcdRasterModelHeightProviderFactory
public ALcdRasterModelHeightProviderFactory()
-
-
Method Details
-
createModelElementHeightProvider
protected abstract ILcdHeightProvider createModelElementHeightProvider(Object aElement, Map<String, Object> aRequiredPropertiesSFCT, Map<String, throws TLcdMissingPropertyException, TLcdUnsupportedPropertyExceptionObject> aOptionalProperties) Description copied from class:ALcdModelHeightProviderFactoryCreates anILcdHeightProviderfor the given model element.- Specified by:
createModelElementHeightProviderin classALcdModelHeightProviderFactory- 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
Check if a height provider can be created from the givenILcdModel. The default implementation only returnstrueif the model contains aTLcdRasterModelDescriptoror aTLcdMultilevelRasterModelDescriptor, andfalseotherwise.- Specified by:
canCreateHeightProviderin classALcdModelHeightProviderFactory- Parameters:
aModel- the given model.- Returns:
trueif a height provider can be created from the given model andfalseotherwise.
-
transformProperties
protected void transformProperties(ILcdModel aModel, ILcdGeoReference aFromReference, ILcdGeoReference aToReference, Map<String, Object> aRequiredProperties, Map<String, throws TLcdOutOfBoundsExceptionObject> aOptionalProperties) Description copied from class:ALcdModelHeightProviderFactoryTransforms 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.- Overrides:
transformPropertiesin classALcdModelHeightProviderFactory- 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.aRequiredProperties- the required properties.aOptionalProperties- the optional properties.- Throws:
TLcdOutOfBoundsException- when a property cannot be transformed correctly.
-