Class EllipsoidWrapper
java.lang.Object
org.locationtech.proj4j.geoapi.Wrapper
org.locationtech.proj4j.geoapi.EllipsoidWrapper
- All Implemented Interfaces:
Serializable, org.opengis.metadata.Identifier, org.opengis.referencing.datum.Ellipsoid, org.opengis.referencing.IdentifiedObject, org.opengis.referencing.ReferenceIdentifier
final class EllipsoidWrapper
extends Wrapper
implements org.opengis.referencing.datum.Ellipsoid, Serializable
Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final EllipsoidThe 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
ConstructorsModifierConstructorDescriptionprivateEllipsoidWrapper(Ellipsoid impl) Creates a new wrapper for the given PROJ4J implementation. -
Method Summary
Modifier and TypeMethodDescriptionCollection<org.opengis.util.GenericName> getAlias()Returns other names of this object.javax.measure.Unit<javax.measure.quantity.Length> getCode()Returns the long name if available, or the short name otherwise.doubleReturns computes the inverse flatening from the equator and pole radius.doubleReturns the equator radius of the PROJ4J implementation.doubleReturns the pole radius of the PROJ4J implementation.(package private) ObjectReturns the PROJ4J backing implementation.booleanReturns false since the inverse flatteing is computed.booleanisSphere()(package private) static EllipsoidWrapperWraps the given implementation.Methods inherited from class Wrapper
equals, getAuthority, getCodeSpace, getDomainOfValidity, getIdentifiers, getName, getRemarks, getScope, getVersion, hashCode, toString, toWKTMethods inherited from interface org.opengis.referencing.IdentifiedObject
getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
impl
The wrapped PROJ4 implementation.
-
-
Constructor Details
-
EllipsoidWrapper
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
nullif the given implementation was null
-
implementation
Object implementation()Returns the PROJ4J backing implementation..- Specified by:
implementationin classWrapper- Returns:
- the PROJ4J backing implementation
-
getCode
Returns the long name if available, or the short name otherwise.. In the EPSG database, the primary name is usually the long name. -
getAlias
Returns other names of this object.. In the EPSG database, this is usually the short name (the abbreviation). -
getAxisUnit
public javax.measure.Unit<javax.measure.quantity.Length> getAxisUnit()- Specified by:
getAxisUnitin interfaceorg.opengis.referencing.datum.Ellipsoid- Returns:
- the axis unit of measurement, which is assumed to be metres.
-
getSemiMajorAxis
public double getSemiMajorAxis()Returns the equator radius of the PROJ4J implementation..- Specified by:
getSemiMajorAxisin interfaceorg.opengis.referencing.datum.Ellipsoid- Returns:
- the equator radius of the PROJ4J implementation
-
getSemiMinorAxis
public double getSemiMinorAxis()Returns the pole radius of the PROJ4J implementation..- Specified by:
getSemiMinorAxisin interfaceorg.opengis.referencing.datum.Ellipsoid- Returns:
- the pole radius of the PROJ4J implementation
-
getInverseFlattening
public double getInverseFlattening()Returns computes the inverse flatening from the equator and pole radius..- Specified by:
getInverseFlatteningin interfaceorg.opengis.referencing.datum.Ellipsoid- Returns:
- computes the inverse flatening from the equator and pole radius
-
isIvfDefinitive
public boolean isIvfDefinitive()Returns false since the inverse flatteing is computed..- Specified by:
isIvfDefinitivein interfaceorg.opengis.referencing.datum.Ellipsoid- Returns:
- false since the inverse flatteing is computed
-
isSphere
public boolean isSphere()- Specified by:
isSpherein interfaceorg.opengis.referencing.datum.Ellipsoid- Returns:
- whether the equator and pole radius are equal. Strict equality is okay because those values are set explicitly.
-