Class TLcdEarthMultivaluedData
java.lang.Object
com.luciad.earth.tileset.datatype.TLcdEarthMultivaluedData
- Direct Known Subclasses:
TLcdEarthElevationData
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
ConstructorsConstructorDescriptionTLcdEarthMultivaluedData(double[][] aValues, int aWidth, int aHeight, Double[][] aMinMaxValues) Constructs a multi-valuedTLcdEarthMultivaluedDatawith the specified data.TLcdEarthMultivaluedData(double[] aValues, int aWidth, int aHeight, Double aMin, Double aMax) Constructs a single-valuedTLcdEarthMultivaluedDatawith the specified data. -
Method Summary
Modifier and TypeMethodDescriptionintThe 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.intThe number of parameters of the data.doublegetValueAt(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.intgetWidth()The number of values in the x direction (that is a row).
-
Constructor Details
-
TLcdEarthMultivaluedData
public TLcdEarthMultivaluedData(double[] aValues, int aWidth, int aHeight, Double aMin, Double aMax) Constructs a single-valuedTLcdEarthMultivaluedDatawith the specified data.- Parameters:
aValues- the array of values. This array should containaWidth x aHeightvalues ordered in row-major form (e.g. the rows are put one after another)aWidth- the number of values in a rowaHeight- the number of values in a columnaMin- the minimum value in the data, ornullaMax- the maximum value in the data, ornull
-
TLcdEarthMultivaluedData
public TLcdEarthMultivaluedData(double[][] aValues, int aWidth, int aHeight, Double[][] aMinMaxValues) Constructs a multi-valuedTLcdEarthMultivaluedDatawith the specified data.- Parameters:
aValues- the arrays of values for each parameter. Each array should containaWidth x aHeightvalues ordered in row-major form (e.g. the rows are put one after another)aWidth- the number of values in a rowaHeight- the number of values in a columnaMinMaxValues- the arrays with the minimum and maximum value for each parameter. Each array should contain 2 values: a minimum and a maximum (both can benull). 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
Gets the minimum value in the data for the specified parameter. A value ofDouble.NaNindicates full transparency.- Parameters:
aParameterIndex- the parameter index in [0,getParameterCount()[- Returns:
- minimum value, or
nullif not available
-
getMaximumValue
Gets the maximum value in the data for the specified parameter. A value ofDouble.NaNindicates full transparency.- Parameters:
aParameterIndex- the parameter index in [0,getParameterCount()[- Returns:
- maximum value,, or
nullif not available
-
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 benull.- Returns:
- the extrema (min and max) for all parameters
-