Class CDMGridMappedProjection

All Implemented Interfaces:
Cloneable

public class CDMGridMappedProjection extends EarthTransform2D
The CDMGridMappedProjection class wraps a Java NetCDF CDM projection and allows access to transform calculations through the standard EarthTransform interface.
Since:
3.3.1
Author:
Peter Hollemans
  • Field Details

  • Constructor Details

    • CDMGridMappedProjection

      public CDMGridMappedProjection(ucar.nc2.dt.GridCoordSystem coordSystem)
      Constructs a new projection.
      Parameters:
      coordSystem - the grid coordinate system to use to create the projection.
      Throws:
      IllegalArgumentException - if the coordinate system cannot be used by this class.
  • Method Details

    • getName

      public String getName()
      Gets the projection name.
      Returns:
      the projection name.
      Since:
      3.6.1
    • getPixelSize

      public double getPixelSize()
      Gets the map pixel size.
      Returns:
      the pixel size in projection units.
      Since:
      3.6.1
      See Also:
    • getProjectionUnits

      public String getProjectionUnits()
      Gets the projection system units.
      Returns:
      the projection units that match the pixel size (km, radians, or degrees) or null if they could not be determined.
      Since:
      3.6.1
      See Also:
    • describe

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

      public String toString()
      Overrides:
      toString in class Object
    • isCompatibleSystem

      public static boolean isCompatibleSystem(ucar.nc2.dt.GridCoordSystem system)
      Checks if a coordinate system is compatible with this class.
      Parameters:
      system - the grid coordinate system to test.
      Returns:
      true if the coordinate system can be used with this class or false if not.
    • getDatum

      public Datum getDatum()
      Description copied from class: EarthTransform
      Gets the transform datum. Unless overridden by the child class, this method returns WGS84.
      Overrides:
      getDatum in class EarthTransform
      Returns:
      the geodetic datum.
    • 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:
    • 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:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • main

      public static void main(String[] argv) throws Exception
      Tests this class.
      Parameters:
      argv - the array of command line parameters.
      Throws:
      Exception