Package com.luciad.util.height
Interface ILcdLayerHeightProviderFactory
- All Known Implementing Classes:
TLcdEarthGXYLayerHeightProviderFactory
,TLcyAsynchronousLayerHeightProviderFactory
,TLcyCompositeLayerHeightProviderFactory
public interface ILcdLayerHeightProviderFactory
This interface provides a method to create a height provider from a layer and a view.
Relation to the
This interface is similar to the
Relation to the ILcdModelHeightProvider
This interface is similar to the ILcdModelHeightProviderFactory
except
that it creates a height provider from a layer and view instead of a model. The created height
provider should return heights as they are being used (ex. painted) by the layer at that time. In
other words, the returned heights are in sync with the layer and view. Using a layer-based
height provider often results in better performance because it uses the same data as the layer
(e.g. is likely that the necessary data is cached).
Sample Code
// Create a height provider factory.
ILcdLayerHeightProviderFactory factory = ...
// Specify the desired properties for the height provider.
Map<String, Object> requiredProperties = ...
Map<String, Object> optionalProperties = ...
...
// Create a height provider from a layer.
ILcdHeightProvider heightProvider = factory.createHeightProvider(aLayer, aView, requiredProperties,
optionalProperties);
// Retrieve height values using this height provider.
double height = heightProvider.retrieveHeightAt(new TLcdLonLatPoint(10.0, 20.0));
- Since:
- 10.1
- See Also:
-
Field Summary
-
Method Summary
-
Field Details
-
KEY_GEO_REFERENCE
Key used for an ILcdGeoReference property. The returned height is expressed in function of this ILcdReference. The property should be anILcdGeoReference
. This key is identical to ILcdModelHeightProviderFactory#KEY_GEO_REFERENCE.- See Also:
-
-
Method Details
-
createHeightProvider
ILcdHeightProvider createHeightProvider(ILcdLayer aLayer, ILcdView aView, Map<String, Object> aRequiredPropertiesSFCT, Map<String, throws TLcdMissingPropertyException, TLcdUnsupportedPropertyExceptionObject> aOptionalProperties) Returns a height provider for a givenILcdLayer
andILcdView
using the given properties. The returned height provider is determined by the implementation, theILcdLayer
,ILcdView
and the given properties.- Parameters:
aLayer
- anILcdLayer
for which a height provider is created.aView
- anILcdView
in whichaLayer
is contained.aRequiredPropertiesSFCT
- 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 be null. When a required property as used, it should always be removed from the list of required properties. When anILcdHeightProvider
is actually made, the list of required properties should be verified.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:
-