public interface ILcdLayerHeightProviderFactory
ILcdModelHeightProvider
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).
// 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));
ILcdModelHeightProviderFactory
Modifier and Type | Field and Description |
---|---|
static String |
KEY_GEO_REFERENCE
Key used for an ILcdGeoReference property.
|
Modifier and Type | Method and Description |
---|---|
ILcdHeightProvider |
createHeightProvider(ILcdLayer aLayer,
ILcdView aView,
Map<String,Object> aRequiredPropertiesSFCT,
Map<String,Object> aOptionalProperties)
Returns a height provider for a given
ILcdLayer and ILcdView using
the given properties. |
static final String KEY_GEO_REFERENCE
ILcdGeoReference
. This key is identical
to ILcdModelHeightProviderFactory#KEY_GEO_REFERENCE.ILcdHeightProvider createHeightProvider(ILcdLayer aLayer, ILcdView aView, Map<String,Object> aRequiredPropertiesSFCT, Map<String,Object> aOptionalProperties) throws TLcdMissingPropertyException, TLcdUnsupportedPropertyException
ILcdLayer
and ILcdView
using
the given properties. The returned height provider is determined by the implementation, the
ILcdLayer
, ILcdView
and the given properties.aLayer
- an ILcdLayer
for which a height provider is
created.aView
- an ILcdView
in which aLayer
is
contained.aRequiredPropertiesSFCT
- the required properties. The properties can be retrieved using a
String
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 an
ILcdHeightProvider
is actually made, the list of
required properties should be verified.aOptionalProperties
- the optional properties. The properties can be retrieved using a
String
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.null
when elevation is not
supported or when no valid height provider can be created.TLcdMissingPropertyException
- when the implementation misses a necessary property.TLcdUnsupportedPropertyException
- when a required property is not used by the
implementation.ILcdModelHeightProviderFactory