Documentation of 'visad.EmpiricalCoordinateSystem' Java class
EmpiricalCoordinateSystem
visad

Class EmpiricalCoordinateSystem

  • All Implemented Interfaces:
    java.io.Serializable


    public final class EmpiricalCoordinateSystem
    extends CoordinateSystem
    implements java.io.Serializable
    Provides support for empirically-defined CoordinateSystem-s. This is useful for data-dependent coordinate transformations that must be determined empirically rather than analytically (e.g. pressure <-> height).

    Coordinates in this system are termed "world" coordinates and coordinates in the reference coordinate system are termed "reference" coordinates.

    Instances of this class are immutable.

    See Also:
    Serialized Form
    • Constructor Detail

      • EmpiricalCoordinateSystem

        public EmpiricalCoordinateSystem(GriddedSet world,
                                         GriddedSet reference)
                                  throws VisADException
        Constructs from two GriddedSet-s. The dimensionality (i.e. rank and lengths) of the two sets must be identical. The RealTupleType of the reference will be that of the reference set. The units of the world coordinates will be the actual units of the world set.
        Parameters:
        world - A set of world coordinates. world.getLengths() shall equal reference.getLengths(). Determines the default units of world coordinates: the default units will be those of world.getSetUnits().
        reference - A set of reference coordinates. Determines the reference RealTupleType.
        Throws:
        VisADException - Couldn't create necessary VisAD object.
      • EmpiricalCoordinateSystem

        public EmpiricalCoordinateSystem(GriddedSet world,
                                         GriddedSet reference,
                                         boolean copy,
                                         boolean check)
                                  throws VisADException
        Constructs from two GriddedSet-s. The dimensionality (i.e. rank and lengths) of the two sets must be identical. The RealTupleType of the reference will be that of the reference set. The units of the world coordinates will be the actual units of the world set.
        Parameters:
        world - A set of world coordinates. world.getLengths() shall equal reference.getLengths(). Determines the default units of world coordinates: the default units will be those of world.getSetUnits().
        reference - A set of reference coordinates. Determines the reference RealTupleType.
        copy - copy samples if clone is made
        check - check whether samples form a valid grid
        Throws:
        VisADException - Couldn't create necessary VisAD object.
    • Method Detail

      • create

        public static EmpiricalCoordinateSystem create(Field field)
                                                throws SetException,
                                                       VisADException,
                                                       java.rmi.RemoteException
        Constructs an EmpiricalCoordinateSystem from a Field. The toReference() method of the resulting CoordinateSystem will transform numeric values in actual units of the domain of the field to numeric values in default units of the range of the field. Similarly, the fromReference() method will transform numeric values in default units of the range of the field to numeric values in the actual units of the domain of the field.
        Parameters:
        field - The FlatField comprising a coordinate system transformation from the domain to the range. The rank of the domain and range shall be the same. The domain set of the field shall be a GriddedSet.
        Throws:
        SetException - The field's domain set isn't a GriddedSet.
        VisADException - Couldn't create necessary VisAD object.
        java.rmi.RemoteException - Java RMI failure.
      • inverseCreate

        public static EmpiricalCoordinateSystem inverseCreate(Field field)
                                                       throws SetException,
                                                              VisADException,
                                                              java.rmi.RemoteException
        Constructs an EmpiricalCoordinateSystem from a Field. The toReference() method of the resulting CoordinateSystem will transform numeric values in actual units of the range of the field to numeric values in default units of the domain of the field. Similarly, the fromReference() method will transform numeric values in default units of the domain of the field to numeric values in the actual units of the range of the field. The coordinate system transformation created by this method is the inverse of that created by create(Field).
        Parameters:
        field - The FlatField comprising a coordinate system transformation from the range to the domain. The rank of the domain and range shall be the same. The domain set of the field shall be a GriddedSet.
        Throws:
        SetException - The field's domain set isn't a GriddedSet.
        VisADException - Couldn't create necessary VisAD object.
        java.rmi.RemoteException - Java RMI failure.
      • getWorldSet

        public GriddedSet getWorldSet()
        Returns the Set of world coordinates.
        Returns:
        The Set of world coordinates.
      • getReferenceSet

        public GriddedSet getReferenceSet()
        Returns the Set of reference coordinates.
        Returns:
        The Set of reference coordinates.
      • fromReference

        public double[][] fromReference(double[][] values)
                                 throws SetException,
                                        VisADException
        Converts reference coordinates to world coordinates.
        Specified by:
        fromReference in class CoordinateSystem
        Parameters:
        values - Numeric reference coordinates in default units of the reference RealTupleType to be converted to numeric world coordinates. values.length shall equal getDimension() and values[i].length shall be the same for all i.
        Returns:
        values which now contains world coordinates. Values which could not be converted will have the value Double.NaN.
        Throws:
        SetException - Mismatch between input values and field domain.
        VisADException - Couldn't create necessary VisAD object.
      • toReference

        public double[][] toReference(double[][] values)
                               throws SetException,
                                      VisADException
        Convert world coordinates to reference coordinates.
        Specified by:
        toReference in class CoordinateSystem
        Parameters:
        values - Numeric world coordinates to be converted to numeric reference coordinates in default units of the reference RealTupleType. values.length shall equal getDimension() and values[i].length shall be the same for all i.
        Returns:
        values which now contains world coordinates. Values which could not be converted will have the value Double.NaN.
        Throws:
        SetException - Mismatch between input values and field domain.
        VisADException - Couldn't create necessary VisAD object.
      • fromReference

        public float[][] fromReference(float[][] values)
                                throws SetException,
                                       VisADException
        Converts reference coordinates to world coordinates.
        Overrides:
        fromReference in class CoordinateSystem
        Parameters:
        values - Numeric reference coordinates in default units of the reference RealTupleType to be converted to numeric world coordinates. values.length shall equal getDimension() and values[i].length shall be the same for all i.
        Returns:
        values which now contains world coordinates. Values which could not be converted will have the value Double.NaN.
        Throws:
        SetException - Mismatch between input values and field domain.
        VisADException - Couldn't create necessary VisAD object.
      • toReference

        public float[][] toReference(float[][] values)
                              throws SetException,
                                     VisADException
        Convert world coordinates to reference coordinates.
        Overrides:
        toReference in class CoordinateSystem
        Parameters:
        values - Numeric world coordinates to be converted to numeric reference coordinates in default units of the reference RealTupleType. values.length shall equal getDimension() and values[i].length shall be the same for all i.
        Returns:
        values which now contains world coordinates. Values which could not be converted will have the value Double.NaN.
        Throws:
        SetException - Mismatch between input values and field domain.
        VisADException - Couldn't create necessary VisAD object.
      • equals

        public boolean equals(java.lang.Object object)
        Indicates if this coordinate system is semantically identical to an object.
        Specified by:
        equals in class CoordinateSystem
        Parameters:
        object - The object in question.
        Returns:
        true if and only if this coordinate system is semantically identical to object.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.