|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisad.CoordinateSystem
visad.CartesianProductCoordinateSystem
public class CartesianProductCoordinateSystem
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 Summary | |
---|---|
CartesianProductCoordinateSystem(CoordinateSystem[] csArray)
Construct a CartesianProductCoordinateSystem from an array of CoordinateSystems. |
|
CartesianProductCoordinateSystem(CoordinateSystem a,
CoordinateSystem b)
Construct a CartesianProductCoordinateSystem from two other CoordinateSystems. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CartesianProductCoordinateSystem(CoordinateSystem a, CoordinateSystem b) throws VisADException
a
- first non-null CoordinateSystemb
- second non-null CoordinateSystem
VisADException
- a or b are null or VisAD object can't be createdpublic CartesianProductCoordinateSystem(CoordinateSystem[] csArray) throws VisADException
csArray
- non-null array of non-null CoordinateSystems
VisADException
- an element is null or VisAD object can't be
created.Method Detail |
---|
public CoordinateSystem[] getCoordinateSystems()
public CoordinateSystem getCoordinateSystem(int index)
index
- index into the array
ArrayIndexOutOfBoundsException
- (no need to declare)
if index out of boundspublic double[][] toReference(double[][] input) throws VisADException
toReference
in class CoordinateSystem
input
- input array
VisADException
- input array has the wrong dimension or is nullpublic double[][] fromReference(double[][] refTuple) throws VisADException
fromReference
in class CoordinateSystem
refTuple
- reference tuple array
VisADException
- input array has the wrong dimension or is nullpublic float[][] toReference(float[][] input) throws VisADException
toReference
in class CoordinateSystem
input
- input array
VisADException
- input array has the wrong dimension or is nullpublic float[][] fromReference(float[][] refTuple) throws VisADException
fromReference
in class CoordinateSystem
refTuple
- reference tuple array
VisADException
- input array has the wrong dimension or is nullpublic boolean equals(Object o)
equals
in class CoordinateSystem
o
- object in question
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |