Class DatumWrapper

java.lang.Object
org.locationtech.proj4j.geoapi.Wrapper
org.locationtech.proj4j.geoapi.DatumWrapper
All Implemented Interfaces:
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, Serializable
Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final Datum
    The wrapped PROJ4 implementation.
    private final PrimeMeridian
    The prime meridian, or null for Greenwich

    Fields inherited from class Wrapper

    BIDIMENSIONAL, TRIDIMENSIONAL

    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
    Creates a new wrapper for the given PROJ4J implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Collection<org.opengis.util.GenericName>
    Returns other names of this object.
    org.opengis.util.InternationalString
     
    Returns the long name if available, or the short name otherwise.
    org.opengis.referencing.datum.Ellipsoid
    Returns the PROJ4J ellipsoid wrapped behind the GeoAPI interface.
    org.opengis.referencing.datum.PrimeMeridian
    Returns the hard-coded Greenwich prime meridian.
     
    (package private) Object
    Returns the PROJ4J backing implementation.
    (package private) static DatumWrapper
    Wraps the given implementation.
    (package private) static DatumWrapper
    wrap(Datum impl)
    Wraps the given implementation.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.opengis.referencing.datum.Datum

    getDomainOfValidity, getScope

    Methods inherited from interface org.opengis.referencing.IdentifiedObject

    getIdentifiers, getName, getRemarks, toWKT
  • Field Details

    • impl

      final Datum impl
      The wrapped PROJ4 implementation.
    • pm

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

    • DatumWrapper

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

    • 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

      Wraps the given implementation.
      Parameters:
      crs - the CRS to wrap, or null
      Returns:
      the wrapper, or null if the given implementation was null
    • 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 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
      Returns:
      the long name if available, or the short name otherwise
    • getAlias

      public Collection<org.opengis.util.GenericName> getAlias()
      Returns 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
      Returns:
      other names of this object
    • getEllipsoid

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

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

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

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