Class Sphere

All Implemented Interfaces:
Serializable, Formattable, Deprecable, LenientComparable, org.opengis.referencing.datum.Ellipsoid, org.opengis.referencing.IdentifiedObject

final class Sphere extends DefaultEllipsoid
A ellipsoid which is spherical.

Immutability and thread safety

This class is immutable and thus thread-safe if the property values (not necessarily the map itself) given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if all components were created using only SIS factories and static constants.
Since:
0.4
Version:
1.1
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial number for inter-operability with different versions.
      See Also:
  • Constructor Details

    • Sphere

      protected Sphere(Map<String,?> properties, double radius, boolean ivfDefinitive, javax.measure.Unit<javax.measure.quantity.Length> unit)
      Creates a new sphere using the specified radius.
      Parameters:
      properties - the properties to be given to the identified object.
      radius - the equatorial and polar radius.
      ivfDefinitive - true if the inverse flattening is definitive.
      unit - the units of the radius value.
  • Method Details

    • isSphere

      public boolean isSphere()
      Returns true since this object is a sphere.
      Specified by:
      isSphere in interface org.opengis.referencing.datum.Ellipsoid
      Overrides:
      isSphere in class DefaultEllipsoid
      Returns:
      true if the ellipsoid is degenerate and is actually a sphere.
    • getAuthalicRadius

      public double getAuthalicRadius()
      This ellipsoid is already a sphere, so returns its radius directly.
      Overrides:
      getAuthalicRadius in class DefaultEllipsoid
      Returns:
      the radius of a sphere having the same surface than this ellipsoid.
      See Also:
    • getEccentricity

      public double getEccentricity()
      Eccentricity of a sphere is always zero.
      Overrides:
      getEccentricity in class DefaultEllipsoid
      Returns:
      ℯ, the eccentricity of this ellipsoid.
    • getEccentricitySquared

      public double getEccentricitySquared()
      Eccentricity of a sphere is always zero.
      Overrides:
      getEccentricitySquared in class DefaultEllipsoid
      Returns:
      ℯ², the square of the eccentricity value.
    • flatteningDifference

      public double flatteningDifference(org.opengis.referencing.datum.Ellipsoid other)
      Returns the flattening factor of the other ellipsoid, since the flattening factor of this is zero.
      Overrides:
      flatteningDifference in class DefaultEllipsoid
      Parameters:
      other - the other ellipsoid from which to get flattening difference.
      Returns:
      (other ellipsoid flattening) - (this ellipsoid flattening).