Package org.locationtech.proj4j.geoapi
Class EllipsoidWrapper
- java.lang.Object
-
- org.locationtech.proj4j.geoapi.Wrapper
-
- org.locationtech.proj4j.geoapi.EllipsoidWrapper
-
- All Implemented Interfaces:
java.io.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, java.io.Serializable
Wraps a PROJ4J implementation behind the equivalent GeoAPI interface.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Ellipsoid
impl
The wrapped PROJ4 implementation.-
Fields inherited from class org.locationtech.proj4j.geoapi.Wrapper
BIDIMENSIONAL, TRIDIMENSIONAL
-
-
Constructor Summary
Constructors Modifier Constructor Description private
EllipsoidWrapper(Ellipsoid impl)
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}.javax.measure.Unit<javax.measure.quantity.Length>
getAxisUnit()
java.lang.String
getCode()
{@return the long name if available, or the short name otherwise}.double
getInverseFlattening()
{@return computes the inverse flatening from the equator and pole radius}.double
getSemiMajorAxis()
{@return the equator radius of the PROJ4J implementation}.double
getSemiMinorAxis()
{@return the pole radius of the PROJ4J implementation}.(package private) java.lang.Object
implementation()
{@return the PROJ4J backing implementation}.boolean
isIvfDefinitive()
{@return false since the inverse flatteing is computed}.boolean
isSphere()
(package private) static EllipsoidWrapper
wrap(Ellipsoid 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 Ellipsoid impl
The wrapped PROJ4 implementation.
-
-
Constructor Detail
-
EllipsoidWrapper
private EllipsoidWrapper(Ellipsoid impl)
Creates a new wrapper for the given PROJ4J implementation.
-
-
Method Detail
-
wrap
static EllipsoidWrapper wrap(Ellipsoid impl)
Wraps the given implementation.- Parameters:
impl
- the implementation 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).
-
getAxisUnit
public javax.measure.Unit<javax.measure.quantity.Length> getAxisUnit()
- Specified by:
getAxisUnit
in interfaceorg.opengis.referencing.datum.Ellipsoid
- Returns:
- the axis unit of measurement, which is assumed to be metres.
-
getSemiMajorAxis
public double getSemiMajorAxis()
{@return the equator radius of the PROJ4J implementation}.- Specified by:
getSemiMajorAxis
in interfaceorg.opengis.referencing.datum.Ellipsoid
-
getSemiMinorAxis
public double getSemiMinorAxis()
{@return the pole radius of the PROJ4J implementation}.- Specified by:
getSemiMinorAxis
in interfaceorg.opengis.referencing.datum.Ellipsoid
-
getInverseFlattening
public double getInverseFlattening()
{@return computes the inverse flatening from the equator and pole radius}.- Specified by:
getInverseFlattening
in interfaceorg.opengis.referencing.datum.Ellipsoid
-
isIvfDefinitive
public boolean isIvfDefinitive()
{@return false since the inverse flatteing is computed}.- Specified by:
isIvfDefinitive
in interfaceorg.opengis.referencing.datum.Ellipsoid
-
isSphere
public boolean isSphere()
- Specified by:
isSphere
in interfaceorg.opengis.referencing.datum.Ellipsoid
- Returns:
- whether the equator and pole radius are equal. Strict equality is okay because those values are set explicitly.
-
-