public class CartesianProductCoordinateSystem extends CoordinateSystem
A class for creating a new CoordinateSystem that is the product of two or more CoordinateSystems. This is useful for creating a new CoordinateSystem when combining values from different Data objects with different CoordinateSystems into a new Data object with a new CoordinateSystem that combines the CoordinateSystems from the original Data objects. An example would be where one CoordinateSystem transforms (row,col) -> (lat,lon) and another CoordinateSystem transforms (pressure) -> (altitude). The resulting CartesianProductCoordinateSystem would transform (row, col, pressure) -> (lat, lon, alt).
The resulting CartesianProductCoordinateSystem will have a dimension of the sum of the dimensions of the individual CoordinateSystems and a Reference RealTupleType that is the composite of the references of each CoordinateSystem. The CoordinateSystem Units are a composite of the Units of each of the CoordinateSystems as well.
Constructor and Description |
---|
CartesianProductCoordinateSystem(CoordinateSystem[] csArray)
Construct a CartesianProductCoordinateSystem from an array of
CoordinateSystems.
|
CartesianProductCoordinateSystem(CoordinateSystem a,
CoordinateSystem b)
Construct a CartesianProductCoordinateSystem from two other
CoordinateSystems.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o)
Check to see if the object in question is equal to this
CartesianProductCoordinateSystem.
|
double[][] |
fromReference(double[][] refTuple)
Convert array of reference valeus from Reference coordinates.
|
float[][] |
fromReference(float[][] refTuple)
Convert array of reference valeus from Reference coordinates.
|
CoordinateSystem |
getCoordinateSystem(int index)
Get a particular CoordinateSystem
|
CoordinateSystem[] |
getCoordinateSystems()
Get the arrays of CoordinateSystems being used in this product
|
double[][] |
toReference(double[][] input)
Convert input array to reference coordinates.
|
float[][] |
toReference(float[][] input)
Convert input array to reference coordinates.
|
canConvert, fromReference, fromReference, getCoordinateSystemUnits, getDimension, getReference, getReferenceUnits, toReference, toReference, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinatesFreeUnits, transformCoordinatesFreeUnits
public CartesianProductCoordinateSystem(CoordinateSystem a, CoordinateSystem b) throws VisADException
a
- first non-null CoordinateSystemb
- second non-null CoordinateSystemVisADException
- a or b are null or VisAD object can't be createdpublic CartesianProductCoordinateSystem(CoordinateSystem[] csArray) throws VisADException
csArray
- non-null array of non-null CoordinateSystemsVisADException
- an element is null or VisAD object can't be
created.public CoordinateSystem[] getCoordinateSystems()
public CoordinateSystem getCoordinateSystem(int index)
index
- index into the arrayArrayIndexOutOfBoundsException
- (no need to declare)
if index out of boundspublic double[][] toReference(double[][] input) throws VisADException
toReference
in class CoordinateSystem
input
- input arrayVisADException
- input array has the wrong dimension or is nullpublic double[][] fromReference(double[][] refTuple) throws VisADException
fromReference
in class CoordinateSystem
refTuple
- reference tuple arrayVisADException
- input array has the wrong dimension or is nullpublic float[][] toReference(float[][] input) throws VisADException
toReference
in class CoordinateSystem
input
- input arrayVisADException
- input array has the wrong dimension or is nullpublic float[][] fromReference(float[][] refTuple) throws VisADException
fromReference
in class CoordinateSystem
refTuple
- reference tuple arrayVisADException
- input array has the wrong dimension or is nullpublic boolean equals(Object o)
equals
in class CoordinateSystem
o
- object in questionCopyright © 1996–2023 The SSEC Visualization Project. All rights reserved.