ucar.visad.quantities
Class AirPressure.AirPressureCoordinateSystem

java.lang.Object
  extended by visad.CoordinateSystem
      extended by ucar.visad.quantities.AirPressure.AirPressureCoordinateSystem
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AirPressure.StandardAtmosphereCoordinateSystem
Enclosing class:
AirPressure

public static class AirPressure.AirPressureCoordinateSystem
extends CoordinateSystem

Provides support for a Pressure <-> Altitude coordinate system transformation.

Author:
Steven R. Emmerson
See Also:
Serialized Form

Constructor Summary
AirPressure.AirPressureCoordinateSystem(Gridded1DSet pressure, Gridded1DSet altitude)
          Constructs from a set of Pressure-s and a set of Altitude-s.
 
Method Summary
 boolean equals(Object obj)
          Indicates if this instance is semantically idential to another object.
 double[][] fromReference(double[][] altitudes)
          Converts to pressures from altitudes.
 float[][] fromReference(float[][] altitudes)
          Converts to pressures from altitudes.
 double[][] toReference(double[][] pressures)
          Converts from pressures to altitudes.
 float[][] toReference(float[][] pressures)
          Converts from pressures to altitudes.
 
Methods inherited from class visad.CoordinateSystem
canConvert, fromReference, fromReference, getCoordinateSystemUnits, getDimension, getReference, getReferenceUnits, toReference, toReference, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinates, transformCoordinatesFreeUnits, transformCoordinatesFreeUnits
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AirPressure.AirPressureCoordinateSystem

public AirPressure.AirPressureCoordinateSystem(Gridded1DSet pressure,
                                               Gridded1DSet altitude)
                                        throws VisADException,
                                               RemoteException
Constructs from a set of Pressure-s and a set of Altitude-s. The reference RealTupleType will be that of the altitude set. The unit of the pressure coordinate will be the actual unit of pressure in the pressure set.

Parameters:
pressure - A set of Pressure-s.
altitude - A set of Altitude-s.
Throws:
VisADException - VisAD failure.
RemoteException - Java RMI failure.
Method Detail

toReference

public double[][] toReference(double[][] pressures)
                       throws VisADException
Converts from pressures to altitudes.

Specified by:
toReference in class CoordinateSystem
Parameters:
pressures - The pressures to be converted in units of getCoordinateSystemUnits()[0]. Only pressures[0] is used. It may be overwritten.
Returns:
Altitudes in units of getReferenceUnits()[0] corresponding to the input pressures.
Throws:
VisADException - VisAD failure.

fromReference

public double[][] fromReference(double[][] altitudes)
                         throws VisADException
Converts to pressures from altitudes.

Specified by:
fromReference in class CoordinateSystem
Parameters:
altitudes - The altitudes to be converted in units of getReferenceUnits()[0]. Only altitudes[0] is used. It may be overwritten.
Returns:
Pressures in units of getCoordinateSystemUnits()[0] corresponding to the input altitudes.
Throws:
VisADException - VisAD failure.

toReference

public float[][] toReference(float[][] pressures)
                      throws VisADException
Converts from pressures to altitudes.

Overrides:
toReference in class CoordinateSystem
Parameters:
pressures - The pressures to be converted in units of getCoordinateSystemUnits()[0]. Only pressures[0] is used. It may be overwritten.
Returns:
Altitudes in units of getReferenceUnits()[0] corresponding to the input pressures.
Throws:
VisADException - VisAD failure.

fromReference

public float[][] fromReference(float[][] altitudes)
                        throws VisADException
Converts to pressures from altitudes.

Overrides:
fromReference in class CoordinateSystem
Parameters:
altitudes - The altitudes to be converted in units of getReferenceUnits()[0]. Only altitudes[0] is used. It may be overwritten.
Returns:
Pressures in units of getCoordinateSystemUnits()[0] corresponding to the input altitudes.
Throws:
VisADException - VisAD failure.

equals

public boolean equals(Object obj)
Indicates if this instance is semantically idential to another object.

Specified by:
equals in class CoordinateSystem
Parameters:
obj - The other object.
Returns:
True if an only if this instance is sematically equall to obj.