Class 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 interface org.opengis.referencing.IdentifiedObject

        ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
      • Fields inherited from interface org.opengis.metadata.Identifier

        AUTHORITY_KEY, CODE_KEY
      • Fields inherited from interface org.opengis.referencing.ReferenceIdentifier

        CODESPACE_KEY, VERSION_KEY
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private EllipsoidWrapper​(Ellipsoid impl)
      Creates a new wrapper for the given PROJ4J implementation.
    • 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, or null
        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 class Wrapper
      • 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.
        Specified by:
        getCode in interface org.opengis.metadata.Identifier
        Specified by:
        getCode in class Wrapper
      • 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).
        Specified by:
        getAlias in interface org.opengis.referencing.IdentifiedObject
        Overrides:
        getAlias in class Wrapper
      • 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()
        {@return the equator radius of the PROJ4J implementation}.
        Specified by:
        getSemiMajorAxis in interface org.opengis.referencing.datum.Ellipsoid
      • getSemiMinorAxis

        public double getSemiMinorAxis()
        {@return the pole radius of the PROJ4J implementation}.
        Specified by:
        getSemiMinorAxis in interface org.opengis.referencing.datum.Ellipsoid
      • getInverseFlattening

        public double getInverseFlattening()
        {@return computes the inverse flatening from the equator and pole radius}.
        Specified by:
        getInverseFlattening in interface org.opengis.referencing.datum.Ellipsoid
      • isIvfDefinitive

        public boolean isIvfDefinitive()
        {@return false since the inverse flatteing is computed}.
        Specified by:
        isIvfDefinitive in interface org.opengis.referencing.datum.Ellipsoid
      • 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.