Class PrimeMeridianWrapper

  • All Implemented Interfaces:
    java.io.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, java.io.Serializable
    Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
    • Constructor Detail

      • PrimeMeridianWrapper

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

      • 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

        java.lang.Object implementation()
        {@return the PROJ4J backing implementation}.
        Specified by:
        implementation in class Wrapper
      • getCode

        public java.lang.String getCode()
        {@return the name}.
        Specified by:
        getCode in interface org.opengis.metadata.Identifier
        Specified by:
        getCode in class Wrapper
      • 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