Class DataProjection

All Implemented Interfaces:
Cloneable

public class DataProjection extends EarthTransform2D
The DataProjection class implements earth transform calculations for data coordinates with explicit latitude and longitude data. The only possible operation is translation from data coordinates to geographic coordinates -- the reverse is not implemented.
Since:
3.1.0
Author:
Peter Hollemans
  • Field Details

  • Constructor Details

    • DataProjection

      public DataProjection(DataVariable lat, DataVariable lon)
      Constructs a data projection from the specified latitude and longitude data.
      Parameters:
      lat - a data variable containing latitude data.
      lon - a data variable containing longitude data.
  • Method Details

    • getLat

      public DataVariable getLat()
      Gets the latitude variable used in this projection.
    • getLon

      public DataVariable getLon()
      Gets the longitude variable used in this projection.
    • describe

      public String describe()
      Description copied from class: EarthTransform
      Gets a string describing the earth transform type.
      Specified by:
      describe in class EarthTransform
    • transformImpl

      protected void transformImpl(DataLocation dataLoc, EarthLocation earthLoc)
      Description copied from class: EarthTransform
      Implements the data to geographic transform.
      Specified by:
      transformImpl in class EarthTransform
      See Also:
    • transformImpl

      protected void transformImpl(EarthLocation earthLoc, DataLocation dataLoc)
      Description copied from class: EarthTransform
      Implements the geographic to data transform.
      Specified by:
      transformImpl in class EarthTransform
      See Also:
    • isInvertible

      public boolean isInvertible()
      Description copied from class: EarthTransform
      Determines if this transform is invertible. All transforms should translate from data location to geographic location. But to be invertible, the transform must also translate from geographic location back to data location. This method returns true unless overridden by the child class.
      Overrides:
      isInvertible in class EarthTransform
      Returns:
      true if this transform is invertible or false if not.
    • equals

      public boolean equals(Object obj)
      Compares the specified object with this data projection for equality. The latitudes and longitudes of the two data projections are compared value by value.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to be compared for equality.
      Returns:
      true if the data projections are equivalent, or false if not.