Class TLcdCompositeHeightProvider

java.lang.Object
com.luciad.util.height.TLcdCompositeHeightProvider
All Implemented Interfaces:
ILcdBounded, ILcdHeightProvider

public class TLcdCompositeHeightProvider extends Object implements ILcdHeightProvider
This height provider combines a list of height providers. These height providers must all have the same reference, which is also the reference of this height provider. Height providers may have overlapping bounds. In such cases, the first height provider that returns a valid height prevails.
Since:
9.1
  • Constructor Details

    • TLcdCompositeHeightProvider

      public TLcdCompositeHeightProvider(ILcdHeightProvider[] aHeightProviders)
      Creates a TLcdCompositeHeightProvider using an array of ILcdHeightProviders.

      Note that the static factory method createCompositeHeightProvider(ILcdHeightProvider[]) may create a more efficient height provider, because it avoids creating a composite height provider with only a single element.

      Parameters:
      aHeightProviders - an array of ILcdHeightProviders.
    • TLcdCompositeHeightProvider

      public TLcdCompositeHeightProvider(List<? extends ILcdHeightProvider> aHeightProviders)
      Creates a TLcdCompositeHeightProvider using a list of ILcdHeightProviders.

      Note that the static factory method createCompositeHeightProvider(List) may create a more efficient height provider, because it avoids creating a composite height provider with only a single element.

      Parameters:
      aHeightProviders - a list of ILcdHeightProviders.
  • Method Details

    • getHeightProviders

      public List<ILcdHeightProvider> getHeightProviders()
      Returns a list of ILcdHeightProviders used in this composite height provider. Modifying this list doesn't affect the composite height provider.
      Returns:
      the list of ILcdHeightProviders.
    • createCompositeHeightProvider

      public static ILcdHeightProvider createCompositeHeightProvider(List<? extends ILcdHeightProvider> aHeightProviderList)
      Creates a composite ILcdHeightProvider from a list of height providers.
      Parameters:
      aHeightProviderList - a list of height providers.
      Returns:
      a composite ILcdHeightProvider when the list contains more than 1 height provider. When the list contains only 1 ILcdHeightProvider, this height provider is returned. When the list is empty, null is returned.
    • createCompositeHeightProvider

      public static ILcdHeightProvider createCompositeHeightProvider(ILcdHeightProvider[] aHeightProviders)
      Creates a composite ILcdHeightProvider from an array of height providers.
      Parameters:
      aHeightProviders - an array of height providers.
      Returns:
      a composite ILcdHeightProvider when the array contains more than 1 height provider. When the array contains only 1 ILcdHeightProvider, this height provider is returned. When the array has length 0, null is returned.
    • retrieveHeightAt

      public double retrieveHeightAt(ILcdPoint aPoint)
      Description copied from interface: ILcdHeightProvider
      Returns the height at the given point.
      Specified by:
      retrieveHeightAt in interface ILcdHeightProvider
      Parameters:
      aPoint - a 2D point, in the horizontal reference that is determined by the implementation.
      Returns:
      the elevation at the given point, in the vertical reference that is determined by the implementation. The value may also be Double.NaN, if the elevation is not known.
    • getBounds

      public ILcdBounds getBounds()
      Description copied from interface: ILcdBounded
      Returns the ILcdBounds by which the geometry of this ILcdBounded object is bounded.

      If the geometry does not allow retrieving valid bounds (for example a polyline with 0 points) the return value is unspecified. It is highly recommended to return an undefined bounds. You can create undefined bounds using the default constructors of TLcdLonLatBounds or TLcdXYBounds.

      Specified by:
      getBounds in interface ILcdBounded
      Returns:
      the ILcdBounds by which the geometry of this ILcdBounded object is bounded.