ucar.unidata.view.geoloc
Class MapProjectionDisplay.MapProjection3DAdapter

java.lang.Object
  extended by visad.CoordinateSystem
      extended by ucar.unidata.view.geoloc.MapProjectionDisplay.MapProjection3DAdapter
All Implemented Interfaces:
Serializable
Enclosing class:
MapProjectionDisplay

protected static class MapProjectionDisplay.MapProjection3DAdapter
extends CoordinateSystem

An adapter for visad.georef.MapProjection coordinate systems (ie: ones with * a reference of Lat/Lon). Allows for the conversion from lat/lon to Display.DisplaySpatialCartesianTuple (XYZ). Altitude (z) values are held constant.

See Also:
Serialized Form

Constructor Summary
MapProjectionDisplay.MapProjection3DAdapter(MapProjection mapProjection)
          Construct a new CoordinateSystem which uses a MapProjection for the transformations between x,y and lat/lon.
 
Method Summary
 boolean equals(Object obj)
          See if this is equal to the object in question.
 double[][] fromReference(double[][] xyz)
          Transform display XYZ values to latitude/longitude/altitude
 float[][] fromReference(float[][] xyz)
          Transform display XYZ values to latitude/longitude/altitude
 MapProjection getMapProjection()
          Return the MapProjection being used by the CoordinateSystem.
 double[][] toReference(double[][] latlonalt)
          Transform latitude/longitude/altitude value to XYZ
 float[][] toReference(float[][] latlonalt)
          Transform latitude/longitude/altitude value to XYZ
 
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

MapProjectionDisplay.MapProjection3DAdapter

public MapProjectionDisplay.MapProjection3DAdapter(MapProjection mapProjection)
                                            throws VisADException
Construct a new CoordinateSystem which uses a MapProjection for the transformations between x,y and lat/lon.

Parameters:
mapProjection - CoordinateSystem that transforms from xy in the data space to lat/lon.
Throws:
VisADException - can't create the necessary VisAD object
Method Detail

toReference

public double[][] toReference(double[][] latlonalt)
                       throws VisADException
Transform latitude/longitude/altitude value to XYZ

Specified by:
toReference in class CoordinateSystem
Parameters:
latlonalt - array of latitude, longitude, altitude values
Returns:
array of display xyz values.
Throws:
VisADException - can't create the necessary VisAD object

toReference

public float[][] toReference(float[][] latlonalt)
                      throws VisADException
Transform latitude/longitude/altitude value to XYZ

Overrides:
toReference in class CoordinateSystem
Parameters:
latlonalt - array of latitude, longitude, altitude values
Returns:
array of display xyz values.
Throws:
VisADException - can't create the necessary VisAD object

fromReference

public double[][] fromReference(double[][] xyz)
                         throws VisADException
Transform display XYZ values to latitude/longitude/altitude

Specified by:
fromReference in class CoordinateSystem
Parameters:
xyz - array of Display.DisplaySpatialCartesianTuple XYZ values
Returns:
array of display lat/lon/alt values.
Throws:
VisADException - can't create the necessary VisAD object

fromReference

public float[][] fromReference(float[][] xyz)
                        throws VisADException
Transform display XYZ values to latitude/longitude/altitude

Overrides:
fromReference in class CoordinateSystem
Parameters:
xyz - array of Display.DisplaySpatialCartesianTuple XYZ values
Returns:
array of display lat/lon/alt values.
Throws:
VisADException - can't create the necessary VisAD object

equals

public boolean equals(Object obj)
See if this is equal to the object in question.

Specified by:
equals in class CoordinateSystem
Parameters:
obj - object in question.
Returns:
true if they are equal. The two objects are equal if their MapProjections are equal.

getMapProjection

public MapProjection getMapProjection()
Return the MapProjection being used by the CoordinateSystem.

Returns:
the MapProjection used in this instance