Class TLcdEarthMultivaluedData

java.lang.Object
com.luciad.earth.tileset.datatype.TLcdEarthMultivaluedData
Direct Known Subclasses:
TLcdEarthElevationData

public class TLcdEarthMultivaluedData extends Object
A container for a 2D array of multi-valued values.

The values are typically regularly sampled at the cells of a regular grid of w x h. Where w and h are respectively the number of horizontal and vertical multi-valued values of the data.

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

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

Since:
10.1
  • Constructor Summary

    Constructors
    Constructor
    Description
    TLcdEarthMultivaluedData(double[][] aValues, int aWidth, int aHeight, Double[][] aMinMaxValues)
    Constructs a multi-valued TLcdEarthMultivaluedData with the specified data.
    TLcdEarthMultivaluedData(double[] aValues, int aWidth, int aHeight, Double aMin, Double aMax)
    Constructs a single-valued TLcdEarthMultivaluedData with the specified data.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The number of values in the y direction (that is a column).
    getMaximumValue(int aParameterIndex)
    Gets the maximum value in the data for the specified parameter.
    getMinimumValue(int aParameterIndex)
    Gets the minimum value in the data for the specified parameter.
    Double[][]
    Gets the extrema for all parameters.
    int
    The number of parameters of the data.
    double
    getValueAt(int aParameterIndex, int aX, int aY)
    Returns the value at the given parameter and position.
    double[][]
    Gets the values for all parameters.
    double[]
    getValues(int aParameterIndex)
    The values for the specified parameters.
    int
    The number of values in the x direction (that is a row).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TLcdEarthMultivaluedData

      public TLcdEarthMultivaluedData(double[] aValues, int aWidth, int aHeight, Double aMin, Double aMax)
      Constructs a single-valued TLcdEarthMultivaluedData with the specified data.
      Parameters:
      aValues - the array of values. This array should contain aWidth x aHeight values ordered in row-major form (e.g. the rows are put one after another)
      aWidth - the number of values in a row
      aHeight - the number of values in a column
      aMin - the minimum value in the data, or null
      aMax - the maximum value in the data, or null
    • TLcdEarthMultivaluedData

      public TLcdEarthMultivaluedData(double[][] aValues, int aWidth, int aHeight, Double[][] aMinMaxValues)
      Constructs a multi-valued TLcdEarthMultivaluedData with the specified data.
      Parameters:
      aValues - the arrays of values for each parameter. Each array should contain aWidth x aHeight values ordered in row-major form (e.g. the rows are put one after another)
      aWidth - the number of values in a row
      aHeight - the number of values in a column
      aMinMaxValues - the arrays with the minimum and maximum value for each parameter. Each array should contain 2 values: a minimum and a maximum (both can be null). The number of arrays should be equal to the number of value arrays.
  • Method Details

    • getWidth

      public int getWidth()
      The number of values in the x direction (that is a row).
      Returns:
      the width of the data
    • getHeight

      public int getHeight()
      The number of values in the y direction (that is a column).
      Returns:
      the height of the data
    • getParameterCount

      public int getParameterCount()
      The number of parameters of the data.
      Returns:
      the number of parameters of the data
    • getValues

      public double[][] getValues()
      Gets the values for all parameters. The first index in the two-dimensional array is the parameter index.
      Returns:
      the values for all parameters
    • getValues

      public double[] getValues(int aParameterIndex)
      The values for the specified parameters. This array is ordered in row-major form (that is the rows are put one after another).
      Parameters:
      aParameterIndex - the index of the parameter in [0, getParameterCount()[
      Returns:
      the values
    • getValueAt

      public double getValueAt(int aParameterIndex, int aX, int aY)
      Returns the value at the given parameter and position.
      Parameters:
      aParameterIndex - the parameters index in [0, getParameterCount()[
      aX - the x coordinate in [0,getWidth()[
      aY - the y coordinate in [0,getHeight()[
      Returns:
      the value
    • getMinimumValue

      public Double getMinimumValue(int aParameterIndex)
      Gets the minimum value in the data for the specified parameter. A value of Double.NaN indicates full transparency.
      Parameters:
      aParameterIndex - the parameter index in [0, getParameterCount()[
      Returns:
      minimum value, or null if not available
    • getMaximumValue

      public Double getMaximumValue(int aParameterIndex)
      Gets the maximum value in the data for the specified parameter. A value of Double.NaN indicates full transparency.
      Parameters:
      aParameterIndex - the parameter index in [0, getParameterCount()[
      Returns:
      maximum value,, or null if not available
    • getMinMaxValues

      public Double[][] getMinMaxValues()
      Gets the extrema for all parameters. The returned array is an n x 2 two-dimensional array, where n is the parameter count. For the parameter at index i, the minimum is at [i][0] and the maximum at [i][1]. Both minimum and maximum may be null.
      Returns:
      the extrema (min and max) for all parameters