Interface ILcdLayerHeightProviderFactory

All Known Implementing Classes:

public interface ILcdLayerHeightProviderFactory
This interface provides a method to create a height provider from a layer and a view.

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,

 // Retrieve height values using this height provider.
 double height = heightProvider.retrieveHeightAt(new TLcdLonLatPoint(10.0,  20.0));
See Also:
  • Field Details

  • Method Details

    • createHeightProvider

      ILcdHeightProvider createHeightProvider(ILcdLayer aLayer, ILcdView aView, Map<String,Object> aRequiredPropertiesSFCT, Map<String,Object> aOptionalProperties) throws TLcdMissingPropertyException, TLcdUnsupportedPropertyException
      Returns a height provider for a given 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.
      a height provider if elevation is supported, or 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.
      See Also: