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 longSerial number for inter-operability with different versions.Fields inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
DEPRECATED_KEY, LOCALE_KEYFields inherited from interface org.opengis.referencing.IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleflatteningDifference(org.opengis.referencing.datum.Ellipsoid other) Returns the flattening factor of the other ellipsoid, since the flattening factor ofthisis zero.doubleThis ellipsoid is already a sphere, so returns its radius directly.doubleEccentricity of a sphere is always zero.doubleEccentricity of a sphere is always zero.booleanisSphere()Returnstruesince 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, semiMajorAxisDifferenceMethods inherited from class org.apache.sis.referencing.AbstractIdentifiedObject
castOrCopy, equals, formatTo, getAlias, getDescription, getIdentifiers, getName, getRemarks, hashCode, isDeprecated, isHeuristicMatchForNameMethods inherited from class org.apache.sis.io.wkt.FormattableObject
print, toString, toString, toWKTMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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-trueif the inverse flattening is definitive.unit- the units of the radius value.
-
-
Method Details
-
isSphere
public boolean isSphere()Returnstruesince this object is a sphere.- Specified by:
isSpherein interfaceorg.opengis.referencing.datum.Ellipsoid- Overrides:
isSpherein classDefaultEllipsoid- Returns:
trueif 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:
getAuthalicRadiusin 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:
getEccentricityin classDefaultEllipsoid- Returns:
- ℯ, the eccentricity of this ellipsoid.
-
getEccentricitySquared
public double getEccentricitySquared()Eccentricity of a sphere is always zero.- Overrides:
getEccentricitySquaredin 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 ofthisis zero.- Overrides:
flatteningDifferencein classDefaultEllipsoid- Parameters:
other- the other ellipsoid from which to get flattening difference.- Returns:
- (other ellipsoid flattening) - (this ellipsoid flattening).
-