Class DatumWrapper

  • All Implemented Interfaces:
    java.io.Serializable, org.opengis.metadata.Identifier, org.opengis.referencing.datum.Datum, org.opengis.referencing.datum.GeodeticDatum, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.ReferenceIdentifier

    final class DatumWrapper
    extends Wrapper
    implements org.opengis.referencing.datum.GeodeticDatum, java.io.Serializable
    Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) Datum impl
      The wrapped PROJ4 implementation.
      private PrimeMeridian pm
      The prime meridian, or null for Greenwich
      • Fields inherited from interface org.opengis.referencing.datum.Datum

        ANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEY
      • Fields inherited from interface org.opengis.referencing.IdentifiedObject

        ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
      • Fields inherited from interface org.opengis.metadata.Identifier

        AUTHORITY_KEY, CODE_KEY
      • Fields inherited from interface org.opengis.referencing.ReferenceIdentifier

        CODESPACE_KEY, VERSION_KEY
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DatumWrapper​(Datum impl, PrimeMeridian pm)
      Creates a new wrapper for the given PROJ4J implementation.
    • Field Detail

      • impl

        final Datum impl
        The wrapped PROJ4 implementation.
      • pm

        private final PrimeMeridian pm
        The prime meridian, or null for Greenwich
    • Constructor Detail

      • DatumWrapper

        private DatumWrapper​(Datum impl,
                             PrimeMeridian pm)
        Creates a new wrapper for the given PROJ4J implementation.
    • Method Detail

      • wrap

        static DatumWrapper wrap​(Datum impl)
        Wraps the given implementation.
        Parameters:
        impl - the implementation to wrap, or null
        Returns:
        the wrapper, or null if the given implementation was null
      • wrap

        static DatumWrapper wrap​(CoordinateReferenceSystem crs)
        Wraps the given implementation.
        Parameters:
        crs - the CRS to wrap, or null
        Returns:
        the wrapper, or null if the given implementation was null
      • implementation

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

        public java.lang.String getCode()
        {@return the long name if available, or the short name otherwise}. In the EPSG database, the primary name is usually the long name.
        Specified by:
        getCode in interface org.opengis.metadata.Identifier
        Specified by:
        getCode in class Wrapper
      • getAlias

        public java.util.Collection<org.opengis.util.GenericName> getAlias()
        {@return other names of this object}. In the EPSG database, this is usually the short name (the abbreviation).
        Specified by:
        getAlias in interface org.opengis.referencing.IdentifiedObject
        Overrides:
        getAlias in class Wrapper
      • getEllipsoid

        public org.opengis.referencing.datum.Ellipsoid getEllipsoid()
        {@return the PROJ4J ellipsoid wrapped behind the GeoAPI interface}.
        Specified by:
        getEllipsoid in interface org.opengis.referencing.datum.GeodeticDatum
      • getPrimeMeridian

        public org.opengis.referencing.datum.PrimeMeridian getPrimeMeridian()
        {@return the hard-coded Greenwich prime meridian}.
        Specified by:
        getPrimeMeridian in interface org.opengis.referencing.datum.GeodeticDatum
      • getAnchorPoint

        public org.opengis.util.InternationalString getAnchorPoint()
        Specified by:
        getAnchorPoint in interface org.opengis.referencing.datum.Datum
      • getRealizationEpoch

        public java.util.Date getRealizationEpoch()
        Specified by:
        getRealizationEpoch in interface org.opengis.referencing.datum.Datum