Class TLcdEarthElevationData

java.lang.Object
com.luciad.earth.tileset.datatype.TLcdEarthMultivaluedData
com.luciad.earth.tileset.datatype.TLcdEarthElevationData

public class TLcdEarthElevationData extends TLcdEarthMultivaluedData
A container for a 2D array of elevation values.

The elevation values should be regularly sampled at the centers of a regular grid of w x h cells. Where w and h are respectively the number of horizontal and vertical elevations of the elevation data.

A value of Double.NaN indicates transparency (no elevation data available).

Some formats will provide the minimum and maximum value of the elevation data. When not available, null will be returned for the minimum and maximum value.

Since:
8.2
  • Constructor Details

    • TLcdEarthElevationData

      public TLcdEarthElevationData(double[] aElevations, int aWidth, int aHeight)
      Constructs a new TLcdEarthElevationData with the specified data.
      Parameters:
      aElevations - the array of elevation values. This array should contain aWidth x aHeight elevation values ordered in row-major form (e.g. the rows are put one after another)
      aWidth - the number of elevation values in a row
      aHeight - the number of elevation values in a column
    • TLcdEarthElevationData

      public TLcdEarthElevationData(double[] aElevations, int aWidth, int aHeight, double aMinElevation, double aMaxElevation)
      Constructs a new TLcdEarthElevationData with the specified data, including minimum and maximum elevation values.
      Parameters:
      aElevations - the array of elevation values. This array should contain aWidth x aHeight elevation values ordered in row-major form (e.g. the rows are put one after another)
      aWidth - the number of elevation values in a row
      aHeight - the number of elevation values in a column
      aMinElevation - the minimum elevation value in the data, or null
      aMaxElevation - the maximum elevation value in the data, or null
  • Method Details

    • getElevations

      public double[] getElevations()
      Returns the array of elevation values. This array is ordered in row-major form (i.e. the rows are put one after another).
      Returns:
      The array with elevation values.
    • getElevation

      public double getElevation(int aX, int aY)
      Returns the elevation at the given position.
      Parameters:
      aX - The x coordinate in [0,TLcdEarthMultivaluedData.getWidth()[.
      aY - The y coordinate in [0,TLcdEarthMultivaluedData.getHeight()[.
      Returns:
      The elevation value.
    • getMinElevation

      public Double getMinElevation()
      Gets the minimum elevation value in the data. A value of Double.NaN indicates full transparency.
      Returns:
      minimum elevation, or null if not available
    • getMaxElevation

      public Double getMaxElevation()
      Gets the maximum elevation value in the data. A value of Double.NaN indicates full transparency.
      Returns:
      minimum elevation or null if not available
    • getParameterCount

      public int getParameterCount()
      Returns 1.
      Overrides:
      getParameterCount in class TLcdEarthMultivaluedData
      Returns:
      1