visad
Class GridCoordinateSystem
- java.lang.Object
-
- visad.CoordinateSystem
-
- visad.GridCoordinateSystem
-
- All Implemented Interfaces:
- java.io.Serializable
public class GridCoordinateSystem extends CoordinateSystem
GridCoordinateSystem is the VisAD CoordinateSystem class for grids defined by GriddedSets.It should be used as the CoordinateSystem of an IntegerSet describing the set of grid values (so the dimensions of the IntegerSet should match the dimensions of the GriddedSet argument to the GridCoordinateSystem constructor) where the reference RealTupleType describes the value space of the GriddedSet.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description GridCoordinateSystem(GriddedSet s)construct a CoordinateSystem for grid coordinates (e.g., (row, column, level) in 3-D) relative to the value space of set; for example, if satellite pixel locations are defined by explicit latitudes and longitude, these could be used to construct a Gridded2DSet which could then be used to construct a GridCoordinateSystem for (ImageLine, ImageElement) coordinates relative to reference coordinates (Latitude, Longitude)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description booleanequals(java.lang.Object cs)Indicates whether or not this instance is equal to an object (note must test for cs == null).double[][]fromReference(double[][] tuples)Convert RealTuple values from Reference coordinates; for efficiency, input and output values are passed as double[][] arrays rather than RealTuple[] arrays; the array organization is double[tuple_dimension][number_of_tuples]; can modify and return argument array.float[][]fromReference(float[][] tuples)Convert RealTuple values from Reference coordinates; for efficiency, input and output values are passed as float[][] arrays rather than RealTuple[] arrays; the array organization is float[tuple_dimension][number_of_tuples]; can modify and return argument array.GriddedSetgetGriddedSet()Returns the GriddedSet associated with this instance.double[][]toReference(double[][] tuples)Convert RealTuple values to Reference coordinates; for efficiency, input and output values are passed as double[][] arrays rather than RealTuple[] arrays; the array organization is double[tuple_dimension][number_of_tuples]; can modify and return argument array.float[][]toReference(float[][] tuples)Convert RealTuple values to Reference coordinates; for efficiency, input and output values are passed as float[][] arrays rather than RealTuple[] arrays; the array organization is float[tuple_dimension][number_of_tuples]; can modify and return argument array.-
Methods inherited from class visad.CoordinateSystem
canConvert, fromReference, fromReference, getCoordinateSystemUnits, getDimension, getReference, getReferenceUnits, toReference, toReference, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinatesFreeUnits, transformCoordinatesFreeUnits
-
-
-
-
Constructor Detail
-
GridCoordinateSystem
public GridCoordinateSystem(GriddedSet s) throws VisADException
construct a CoordinateSystem for grid coordinates (e.g., (row, column, level) in 3-D) relative to the value space of set; for example, if satellite pixel locations are defined by explicit latitudes and longitude, these could be used to construct a Gridded2DSet which could then be used to construct a GridCoordinateSystem for (ImageLine, ImageElement) coordinates relative to reference coordinates (Latitude, Longitude)- Throws:
VisADException
-
-
Method Detail
-
getGriddedSet
public GriddedSet getGriddedSet()
Returns the GriddedSet associated with this instance.- Returns:
- The GriddedSet associated with this instance.
-
toReference
public double[][] toReference(double[][] tuples) throws VisADExceptionDescription copied from class:CoordinateSystemConvert RealTuple values to Reference coordinates; for efficiency, input and output values are passed as double[][] arrays rather than RealTuple[] arrays; the array organization is double[tuple_dimension][number_of_tuples]; can modify and return argument array.- Specified by:
toReferencein classCoordinateSystem- Parameters:
tuples- array of values assumed to be in coordinateSystem units. Input array is not guaranteed to be immutable and could be used for return.- Returns:
- array of double values in reference coordinates and Units.
- Throws:
VisADException- if problem with conversion.
-
fromReference
public double[][] fromReference(double[][] tuples) throws VisADExceptionDescription copied from class:CoordinateSystemConvert RealTuple values from Reference coordinates; for efficiency, input and output values are passed as double[][] arrays rather than RealTuple[] arrays; the array organization is double[tuple_dimension][number_of_tuples]; can modify and return argument array.- Specified by:
fromReferencein classCoordinateSystem- Parameters:
tuples- array of values assumed to be in reference Units. Input array is not guaranteed to be immutable and could be used for return.- Returns:
- array of double values in CoordinateSystem Units.
- Throws:
VisADException- if problem with conversion.
-
toReference
public float[][] toReference(float[][] tuples) throws VisADExceptionDescription copied from class:CoordinateSystemConvert RealTuple values to Reference coordinates; for efficiency, input and output values are passed as float[][] arrays rather than RealTuple[] arrays; the array organization is float[tuple_dimension][number_of_tuples]; can modify and return argument array. This implementation converts the input array to doubles and callsCoordinateSystem.toReference(double[][])and then returns that converted double array back as a float array. For efficiency, subclasses should override this implementation.- Overrides:
toReferencein classCoordinateSystem- Parameters:
tuples- array of values assumed to be in coordinateSystem units. Input array is not guaranteed to be immutable and could be used for return.- Returns:
- array of float values in reference coordinates and Units.
- Throws:
VisADException- if problem with conversion.
-
fromReference
public float[][] fromReference(float[][] tuples) throws VisADExceptionDescription copied from class:CoordinateSystemConvert RealTuple values from Reference coordinates; for efficiency, input and output values are passed as float[][] arrays rather than RealTuple[] arrays; the array organization is float[tuple_dimension][number_of_tuples]; can modify and return argument array. This implementation converts the input array to doubles and callsCoordinateSystem.toReference(double[][])and then returns that converted double array back as a float array. For efficiency, subclasses should override this implementation.- Overrides:
fromReferencein classCoordinateSystem- Parameters:
tuples- array of values assumed to be in reference Units. Input array is not guaranteed to be immutable and could be used for return.- Returns:
- array of float values in this CoordinateSystem Units.
- Throws:
VisADException- if problem with conversion.
-
equals
public boolean equals(java.lang.Object cs)
Description copied from class:CoordinateSystemIndicates whether or not this instance is equal to an object (note must test for cs == null).- Specified by:
equalsin classCoordinateSystem- Parameters:
cs- the object in question.- Returns:
trueif and only if this instance equals cs.
-
-
DMelt 3.0 © DataMelt by jWork.ORG