Documentation of 'visad.CartesianProductCoordinateSystem' Java class
CartesianProductCoordinateSystem
visad

Class CartesianProductCoordinateSystem

  • All Implemented Interfaces:
    java.io.Serializable


    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.

    See Also:
    Serialized Form
    • Constructor Detail

      • CartesianProductCoordinateSystem

        public CartesianProductCoordinateSystem(CoordinateSystem a,
                                                CoordinateSystem b)
                                         throws VisADException
        Construct a CartesianProductCoordinateSystem from two other CoordinateSystems.
        Parameters:
        a - first non-null CoordinateSystem
        b - second non-null CoordinateSystem
        Throws:
        VisADException - a or b are null or VisAD object can't be created
      • CartesianProductCoordinateSystem

        public CartesianProductCoordinateSystem(CoordinateSystem[] csArray)
                                         throws VisADException
        Construct a CartesianProductCoordinateSystem from an array of CoordinateSystems.
        Parameters:
        csArray - non-null array of non-null CoordinateSystems
        Throws:
        VisADException - an element is null or VisAD object can't be created.
    • Method Detail

      • getCoordinateSystems

        public CoordinateSystem[] getCoordinateSystems()
        Get the arrays of CoordinateSystems being used in this product
        Returns:
        array of CoordinateSystems
      • getCoordinateSystem

        public CoordinateSystem getCoordinateSystem(int index)
        Get a particular CoordinateSystem
        Parameters:
        index - index into the array
        Returns:
        CoordinateSystem from array
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - (no need to declare) if index out of bounds
      • toReference

        public double[][] toReference(double[][] input)
                               throws VisADException
        Convert input array to reference coordinates.
        Specified by:
        toReference in class CoordinateSystem
        Parameters:
        input - input array
        Returns:
        array of values in reference space
        Throws:
        VisADException - input array has the wrong dimension or is null
      • fromReference

        public double[][] fromReference(double[][] refTuple)
                                 throws VisADException
        Convert array of reference valeus from Reference coordinates. Input values are modified in this transaction.
        Specified by:
        fromReference in class CoordinateSystem
        Parameters:
        refTuple - reference tuple array
        Returns:
        array of values in non-reference space
        Throws:
        VisADException - input array has the wrong dimension or is null
      • toReference

        public float[][] toReference(float[][] input)
                              throws VisADException
        Convert input array to reference coordinates.
        Overrides:
        toReference in class CoordinateSystem
        Parameters:
        input - input array
        Returns:
        array of values in reference space
        Throws:
        VisADException - input array has the wrong dimension or is null
      • fromReference

        public float[][] fromReference(float[][] refTuple)
                                throws VisADException
        Convert array of reference valeus from Reference coordinates. Input values are modified in this transaction.
        Overrides:
        fromReference in class CoordinateSystem
        Parameters:
        refTuple - reference tuple array
        Returns:
        array of values in non-reference space
        Throws:
        VisADException - input array has the wrong dimension or is null
      • equals

        public boolean equals(java.lang.Object o)
        Check to see if the object in question is equal to this CartesianProductCoordinateSystem.
        Specified by:
        equals in class CoordinateSystem
        Parameters:
        o - object in question
        Returns:
        true if the the object in question is composed of equal CoordinateSystems.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.