Object
SimpleIdentifiedObject
SimpleDatum
- All Implemented Interfaces:
Identifier
,Datum
,Ellipsoid
,GeodeticDatum
,IdentifiedObject
,ReferenceIdentifier
A
GeodeticDatum
using the Greenwich prime meridian. This class does not make
distinction between Geodetic Datum and Ellipsoid, so we implement
the two interfaces by the same class.- Since:
- 3.1
-
Field Summary
Modifier and TypeFieldDescriptionprotected final double
The inverse flattening factor.protected final double
The semi-major axis length, in metres.static final GeodeticDatum
A spherical datum used for coordinate reference systems where datum is unknown.static final GeodeticDatum
The WGS84 datum.Fields inherited from class SimpleIdentifiedObject
authority, code
Fields inherited from interface Datum
ANCHOR_POINT_KEY, DOMAIN_OF_VALIDITY_KEY, REALIZATION_EPOCH_KEY, SCOPE_KEY
Fields inherited from interface IdentifiedObject
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY
Fields inherited from interface Identifier
AUTHORITY_KEY, CODE_KEY, CODESPACE_KEY, DESCRIPTION_KEY, VERSION_KEY
-
Constructor Summary
ConstructorDescriptionSimpleDatum
(Citation authority, String name, double semiMajorAxis, double inverseFlattening) Creates a new geodetic datum for the given authority, name, and ellipsoid axis length. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this datum with the given object for equality.Unit<Length>
Returns the linear unit of the semi-major and semi-minor axis values.Returns the ellipsoid, which is represented directly bythis
implementation class since it does not distinguish geodetic datum and ellipsoid.double
Returns the value of the inverse of the flattening constant.Returns the prime meridian.double
Length of the semi-major axis of the ellipsoid.double
Length of the semi-minor axis of the ellipsoid.boolean
Indicates if the inverse flattening is definitive for this ellipsoid.boolean
isSphere()
true
if the ellipsoid is degenerate and is actually a sphere.Methods inherited from class SimpleIdentifiedObject
getAuthority, getCode, getCodeSpace, getDomainOfValidity, getName, getScope, hashCode, toString, toWKT
Methods inherited from interface Datum
getAnchorPoint, getDomainOfValidity, getRealizationEpoch, getScope
Methods inherited from interface IdentifiedObject
getAlias, getIdentifiers, getName, getRemarks, toWKT
Methods inherited from interface Identifier
getDescription, getVersion
-
Field Details
-
WGS84
The WGS84 datum. The semi major axis length is 6378137.0 metres and the inverse flattening factor is 298.257223563. -
SPHERE
A spherical datum used for coordinate reference systems where datum is unknown. The axis length are 6371007 metres. -
semiMajorAxis
protected final double semiMajorAxisThe semi-major axis length, in metres.- See Also:
-
inverseFlattening
protected final double inverseFlatteningThe inverse flattening factor.- See Also:
-
-
Constructor Details
-
SimpleDatum
Creates a new geodetic datum for the given authority, name, and ellipsoid axis length.- Parameters:
authority
- organization responsible for definition of the name, ornull
.name
- the name of the new CRS.semiMajorAxis
- the value to be returned bygetSemiMajorAxis()
, in metres.inverseFlattening
- the value to be returned bygetInverseFlattening()
.
-
-
Method Details
-
getEllipsoid
Returns the ellipsoid, which is represented directly bythis
implementation class since it does not distinguish geodetic datum and ellipsoid.- Specified by:
getEllipsoid
in interfaceGeodeticDatum
- Returns:
- the ellipsoid.
-
getAxisUnit
public Unit<Length> getAxisUnit()Returns the linear unit of the semi-major and semi-minor axis values. The default implementation returnsUnits.METRE
.- Specified by:
getAxisUnit
in interfaceEllipsoid
- Returns:
- the axis linear unit.
-
getSemiMajorAxis
public double getSemiMajorAxis()Length of the semi-major axis of the ellipsoid. This is the equatorial radius in axis linear unit.- Specified by:
getSemiMajorAxis
in interfaceEllipsoid
- Returns:
- Length of semi-major axis.
-
getSemiMinorAxis
public double getSemiMinorAxis()Length of the semi-minor axis of the ellipsoid. This is the polar radius in axis linear unit.- Specified by:
getSemiMinorAxis
in interfaceEllipsoid
- Returns:
- Length of semi-minor axis.
-
getInverseFlattening
public double getInverseFlattening()Returns the value of the inverse of the flattening constant.- Specified by:
getInverseFlattening
in interfaceEllipsoid
- Returns:
- the inverse flattening value, or positive infinity if this ellipsoid is a sphere.
-
isIvfDefinitive
public boolean isIvfDefinitive()Indicates if the inverse flattening is definitive for this ellipsoid. The default implementation returnstrue
for if this ellipsoid is not a sphere, since the constructor of thisSimpleDatum
class expects ainverseFlattening
value.- Specified by:
isIvfDefinitive
in interfaceEllipsoid
- Returns:
true
if the inverse flattening is definitive, orfalse
if the polar radius is definitive.
-
isSphere
public boolean isSphere()true
if the ellipsoid is degenerate and is actually a sphere. -
getPrimeMeridian
Returns the prime meridian. The default implementation returns the Greenwich prime meridian.- Specified by:
getPrimeMeridian
in interfaceGeodeticDatum
- Returns:
- the prime meridian.
-
equals
Compares this datum with the given object for equality.- Overrides:
equals
in classSimpleIdentifiedObject
- Parameters:
object
- The object to compare with thisSimpleDatum
.- Returns:
true
if the given object is equal to this object.
-