Class MapProjectionDisplay.MapProjection3DAdapter

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

protected class MapProjectionDisplay.MapProjection3DAdapter extends CoordinateSystem implements InverseLinearScaledCS
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:
  • Constructor Details

    • MapProjection3DAdapter

      public 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 Details

    • 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
    • getScale

      public double[] getScale()
      Get the scale
      Specified by:
      getScale in interface InverseLinearScaledCS
      Returns:
      the scale (x,y)
    • getOffset

      public double[] getOffset()
      Get the offset
      Specified by:
      getOffset in interface InverseLinearScaledCS
      Returns:
      the offset (x_off, y_off)
    • getInvertedCoordinateSystem

      public CoordinateSystem getInvertedCoordinateSystem()
      Get the inverted coordinate system
      Specified by:
      getInvertedCoordinateSystem in interface InverseLinearScaledCS
      Returns:
      the inverted coordinate system