Class ALcdModelHeightProviderFactory

java.lang.Object
com.luciad.util.height.ALcdModelHeightProviderFactory
All Implemented Interfaces:
ILcdModelHeightProviderFactory
Direct Known Subclasses:
ALcdRasterModelHeightProviderFactory

public abstract class ALcdModelHeightProviderFactory extends Object implements ILcdModelHeightProviderFactory
This abstract class provides a method to create an ILcdHeightProvider when an ILcdModel is given.
Since:
9.1
  • Constructor Details

    • ALcdModelHeightProviderFactory

      public ALcdModelHeightProviderFactory()
      Creates a new TLcdModelHeightProviderFactory.
  • Method Details

    • createHeightProvider

      public ILcdHeightProvider createHeightProvider(ILcdModel aModel, Map<String,Object> aRequiredPropertiesSFCT, Map<String,Object> aOptionalProperties) throws TLcdMissingPropertyException, TLcdUnsupportedPropertyException
      Description copied from interface: ILcdModelHeightProviderFactory
      Returns a height provider for a given ILcdModel using the given properties. The returned height provider is determined by the implementation, the ILcdModel and the given properties.
      Specified by:
      createHeightProvider in interface ILcdModelHeightProviderFactory
      Parameters:
      aModel - an ILcdModel for which a height provider is created.
      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 an implementation of this interface uses a required property, it should always remove it from the list of required properties. When the ILcdHeightProvider is actually made, implementations should verify that the list of required properties is empty (and all required properties are used).
      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.
      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:
    • transformProperties

      protected void transformProperties(ILcdModel aModel, ILcdGeoReference aFromReference, ILcdGeoReference aToReference, Map<String,Object> aRequiredPropertiesSFCT, Map<String,Object> aOptionalPropertiesSFCT) throws TLcdOutOfBoundsException
      Transforms the properties in the TLcdHeightProviderProperties. 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 to aToReference.
      Parameters:
      aModel - a model defined with respect to aToReference.
      aFromReference - the reference in which the properties are defined.
      aToReference - the reference to which the properties will be transformed.
      aRequiredPropertiesSFCT - the required properties.
      aOptionalPropertiesSFCT - the optional properties.
      Throws:
      TLcdOutOfBoundsException - when a property cannot be transformed correctly.
    • createModelElementHeightProvider

      protected abstract ILcdHeightProvider createModelElementHeightProvider(Object aElement, Map<String,Object> aRequiredPropertiesSFCT, Map<String,Object> aOptionalProperties) throws TLcdMissingPropertyException, TLcdUnsupportedPropertyException
      Creates an ILcdHeightProvider for the given model element.
      Parameters:
      aElement - a model element.
      aRequiredPropertiesSFCT - the required properties.
      aOptionalProperties - the optional properties.
      Returns:
      an ILcdHeightProvider for the given model element or null if no ILcdHeightProvider can be created.
      Throws:
      TLcdMissingPropertyException - when a property is missing that is necessary to create the ILcdHeightProvider.
      TLcdUnsupportedPropertyException - when a required property was never used while creating the ILcdHeightProvider.
    • canCreateHeightProvider

      protected abstract boolean canCreateHeightProvider(ILcdModel aModel)
      Checks if a height provider can be created from the given ILcdModel.
      Parameters:
      aModel - the given model.
      Returns:
      true if a height provider can be created from the given model and false otherwise.