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 Details

    • impl

      final Ellipsoid impl
      The wrapped PROJ4 implementation.
  • Constructor Details

    • EllipsoidWrapper

      private EllipsoidWrapper(Ellipsoid impl)
      Creates a new wrapper for the given PROJ4J implementation.
  • Method Details

    • wrap

      static EllipsoidWrapper wrap(Ellipsoid impl)
      Wraps the given implementation.
      Parameters:
      impl - the implementation 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
    • getAxisUnit

      public javax.measure.Unit<javax.measure.quantity.Length> getAxisUnit()
      Specified by:
      getAxisUnit in interface org.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:
      getSemiMajorAxis in interface org.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:
      getSemiMinorAxis in interface org.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:
      getInverseFlattening in interface org.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:
      isIvfDefinitive in interface org.opengis.referencing.datum.Ellipsoid
      Returns:
      false since the inverse flatteing is computed
    • isSphere

      public boolean isSphere()
      Specified by:
      isSphere in interface org.opengis.referencing.datum.Ellipsoid
      Returns:
      whether the equator and pole radius are equal. Strict equality is okay because those values are set explicitly.