Package org.apache.sis.referencing.datum
Class Sphere
java.lang.Object
org.apache.sis.io.wkt.FormattableObject
org.apache.sis.referencing.AbstractIdentifiedObject
org.apache.sis.referencing.datum.DefaultEllipsoid
org.apache.sis.referencing.datum.Sphere
- All Implemented Interfaces:
Serializable
,Formattable
,Deprecable
,LenientComparable
,org.opengis.referencing.datum.Ellipsoid
,org.opengis.referencing.IdentifiedObject
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 Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
Serial number for inter-operability with different versions.Fields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEY
Fields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
flatteningDifference
(org.opengis.referencing.datum.Ellipsoid other) Returns the flattening factor of the other ellipsoid, since the flattening factor ofthis
is zero.double
This ellipsoid is already a sphere, so returns its radius directly.double
Eccentricity of a sphere is always zero.double
Eccentricity of a sphere is always zero.boolean
isSphere()
Returnstrue
since this object is a sphere.Methods inherited from class org.apache.sis.referencing.datum.DefaultEllipsoid
castOrCopy, computeHashCode, createEllipsoid, createFlattenedSphere, equals, formatTo, getAxisUnit, getInterface, getInverseFlattening, getRadius, getSemiMajorAxis, getSemiMinorAxis, isIvfDefinitive, semiMajorAxisDifference
Methods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForName
Methods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKT
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.opengis.referencing.IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial 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()Returnstrue
since this object is a sphere.- Specified by:
isSphere
in interfaceorg.opengis.referencing.datum.Ellipsoid
- Overrides:
isSphere
in classDefaultEllipsoid
- 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 classDefaultEllipsoid
- 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 classDefaultEllipsoid
- Returns:
- ℯ, the eccentricity of this ellipsoid.
-
getEccentricitySquared
public double getEccentricitySquared()Eccentricity of a sphere is always zero.- Overrides:
getEccentricitySquared
in classDefaultEllipsoid
- 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 ofthis
is zero.- Overrides:
flatteningDifference
in classDefaultEllipsoid
- Parameters:
other
- the other ellipsoid from which to get flattening difference.- Returns:
- (other ellipsoid flattening) - (this ellipsoid flattening).
-