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
Modifier and TypeFieldDescriptionstatic final String
Key used to to denote that the raster data should be interpolated.static final String
Key for the maximum valid height of the returned height.static final String
Key for the minimum valid height of the returned height.static final String
Key used for a pixel density value.Fields inherited from interface com.luciad.util.height.ILcdModelHeightProviderFactory
KEY_GEO_REFERENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canCreateHeightProvider
(ILcdModel aModel) Check if a height provider can be created from the givenILcdModel
.protected abstract ILcdHeightProvider
createModelElementHeightProvider
(Object aElement, Map<String, Object> aRequiredPropertiesSFCT, Map<String, Object> aOptionalProperties) Creates anILcdHeightProvider
for the given model element.protected void
transformProperties
(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_REFERENCE
property. 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:ALcdModelHeightProviderFactory
Creates anILcdHeightProvider
for the given model element.- Specified by:
createModelElementHeightProvider
in classALcdModelHeightProviderFactory
- Parameters:
aElement
- a model element.aRequiredPropertiesSFCT
- the required properties.aOptionalProperties
- the optional properties.- Returns:
- an
ILcdHeightProvider
for the given model element ornull
if noILcdHeightProvider
can 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 returnstrue
if the model contains aTLcdRasterModelDescriptor
or aTLcdMultilevelRasterModelDescriptor
, andfalse
otherwise.- Specified by:
canCreateHeightProvider
in classALcdModelHeightProviderFactory
- Parameters:
aModel
- the given model.- Returns:
true
if a height provider can be created from the given model andfalse
otherwise.
-
transformProperties
protected void transformProperties(ILcdModel aModel, ILcdGeoReference aFromReference, ILcdGeoReference aToReference, Map<String, Object> aRequiredProperties, Map<String, throws TLcdOutOfBoundsExceptionObject> aOptionalProperties) Description copied from class:ALcdModelHeightProviderFactory
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
.- Overrides:
transformProperties
in 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.
-