Class PrimeMeridianWrapper

java.lang.Object
org.locationtech.proj4j.geoapi.Wrapper
org.locationtech.proj4j.geoapi.PrimeMeridianWrapper
All Implemented Interfaces:
Serializable, org.opengis.metadata.Identifier, org.opengis.referencing.datum.PrimeMeridian, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.ReferenceIdentifier

final class PrimeMeridianWrapper extends Wrapper implements org.opengis.referencing.datum.PrimeMeridian, Serializable
Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
  • Field Details

  • Constructor Details

    • PrimeMeridianWrapper

      private PrimeMeridianWrapper(PrimeMeridian impl)
      Creates a new wrapper for the given PROJ4J implementation.
  • Method Details

    • wrap

      static PrimeMeridianWrapper wrap(PrimeMeridian impl)
      Wraps the given implementation.
      Parameters:
      impl - the implementation to wrap, or null
      Returns:
      the wrapper, or Greenwich if the given implementation was null
    • ifNonGreenwich

      static PrimeMeridian ifNonGreenwich(Projection proj)
      Returns the prime meridian of the given projection if different from Greenwich.
      Parameters:
      proj - the projection from which to get the prime meridian, or null
      Returns:
      the prime meridian if different than Greenwich, or null otherwise.
    • implementation

      Object implementation()
      Returns the PROJ4J backing implementation..
      Specified by:
      implementation in class Wrapper
      Returns:
      the PROJ4J backing implementation
    • getCode

      public String getCode()
      Returns the name..
      Specified by:
      getCode in interface org.opengis.metadata.Identifier
      Specified by:
      getCode in class Wrapper
      Returns:
      the name
    • getGreenwichLongitude

      public double getGreenwichLongitude()
      Specified by:
      getGreenwichLongitude in interface org.opengis.referencing.datum.PrimeMeridian
    • getAngularUnit

      public javax.measure.Unit<javax.measure.quantity.Angle> getAngularUnit()
      Specified by:
      getAngularUnit in interface org.opengis.referencing.datum.PrimeMeridian