Package org.locationtech.proj4j.geoapi
Class DatumWrapper
- java.lang.Object
-
- org.locationtech.proj4j.geoapi.Wrapper
-
- org.locationtech.proj4j.geoapi.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, ornull
for Greenwich-
Fields inherited from class org.locationtech.proj4j.geoapi.Wrapper
BIDIMENSIONAL, TRIDIMENSIONAL
-
Fields inherited from interface org.opengis.referencing.datum.Datum
ANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEY
-
-
Constructor Summary
Constructors Modifier Constructor Description private
DatumWrapper(Datum impl, PrimeMeridian pm)
Creates a new wrapper for the given PROJ4J implementation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<org.opengis.util.GenericName>
getAlias()
{@return other names of this object}.org.opengis.util.InternationalString
getAnchorPoint()
java.lang.String
getCode()
{@return the long name if available, or the short name otherwise}.org.opengis.referencing.datum.Ellipsoid
getEllipsoid()
{@return the PROJ4J ellipsoid wrapped behind the GeoAPI interface}.org.opengis.referencing.datum.PrimeMeridian
getPrimeMeridian()
{@return the hard-coded Greenwich prime meridian}.java.util.Date
getRealizationEpoch()
(package private) java.lang.Object
implementation()
{@return the PROJ4J backing implementation}.(package private) static DatumWrapper
wrap(CoordinateReferenceSystem crs)
Wraps the given implementation.(package private) static DatumWrapper
wrap(Datum impl)
Wraps the given implementation.-
Methods inherited from class org.locationtech.proj4j.geoapi.Wrapper
equals, getAuthority, getCodeSpace, getDomainOfValidity, getIdentifiers, getName, getRemarks, getScope, getVersion, hashCode, toString, toWKT
-
-
-
-
Field Detail
-
impl
final Datum impl
The wrapped PROJ4 implementation.
-
pm
private final PrimeMeridian pm
The prime meridian, ornull
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, ornull
- 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, ornull
- 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 classWrapper
-
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.
-
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).
-
getEllipsoid
public org.opengis.referencing.datum.Ellipsoid getEllipsoid()
{@return the PROJ4J ellipsoid wrapped behind the GeoAPI interface}.- Specified by:
getEllipsoid
in interfaceorg.opengis.referencing.datum.GeodeticDatum
-
getPrimeMeridian
public org.opengis.referencing.datum.PrimeMeridian getPrimeMeridian()
{@return the hard-coded Greenwich prime meridian}.- Specified by:
getPrimeMeridian
in interfaceorg.opengis.referencing.datum.GeodeticDatum
-
getAnchorPoint
public org.opengis.util.InternationalString getAnchorPoint()
- Specified by:
getAnchorPoint
in interfaceorg.opengis.referencing.datum.Datum
-
getRealizationEpoch
public java.util.Date getRealizationEpoch()
- Specified by:
getRealizationEpoch
in interfaceorg.opengis.referencing.datum.Datum
-
-