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 Summary
FieldsModifier and TypeFieldDescriptionprivate static final PrimeMeridianWrapperThe Greenwich prime meridian.(package private) final PrimeMeridianThe wrapped PROJ4 implementation.Fields inherited from class Wrapper
BIDIMENSIONAL, TRIDIMENSIONALFields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEYFields inherited from interface org.opengis.metadata.Identifier
AUTHORITY_KEY, CODE_KEYFields inherited from interface org.opengis.referencing.ReferenceIdentifier
CODESPACE_KEY, VERSION_KEY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCreates a new wrapper for the given PROJ4J implementation. -
Method Summary
Modifier and TypeMethodDescriptionjavax.measure.Unit<javax.measure.quantity.Angle> getCode()Returns the name.double(package private) static PrimeMeridianifNonGreenwich(Projection proj) Returns the prime meridian of the given projection if different from Greenwich.(package private) ObjectReturns the PROJ4J backing implementation.(package private) static PrimeMeridianWrapperwrap(PrimeMeridian impl) Wraps the given implementation.Methods inherited from class Wrapper
equals, getAlias, getAuthority, getCodeSpace, getDomainOfValidity, getIdentifiers, getName, getRemarks, getScope, getVersion, hashCode, toString, toWKTMethods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
GREENWICH
The Greenwich prime meridian. -
impl
The wrapped PROJ4 implementation.
-
-
Constructor Details
-
PrimeMeridianWrapper
Creates a new wrapper for the given PROJ4J implementation.
-
-
Method Details
-
wrap
Wraps the given implementation.- Parameters:
impl- the implementation to wrap, ornull- Returns:
- the wrapper, or Greenwich if the given implementation was null
-
ifNonGreenwich
Returns the prime meridian of the given projection if different from Greenwich.- Parameters:
proj- the projection from which to get the prime meridian, ornull- Returns:
- the prime meridian if different than Greenwich, or
nullotherwise.
-
implementation
Object implementation()Returns the PROJ4J backing implementation..- Specified by:
implementationin classWrapper- Returns:
- the PROJ4J backing implementation
-
getCode
-
getGreenwichLongitude
public double getGreenwichLongitude()- Specified by:
getGreenwichLongitudein interfaceorg.opengis.referencing.datum.PrimeMeridian
-
getAngularUnit
public javax.measure.Unit<javax.measure.quantity.Angle> getAngularUnit()- Specified by:
getAngularUnitin interfaceorg.opengis.referencing.datum.PrimeMeridian
-