|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFormattableObject
AbstractIdentifiedObject
DefaultEllipsoid
@Immutable public class DefaultEllipsoid
Geometric figure that can be used to describe the approximate shape of the earth. In mathematical terms, it is a surface formed by the rotation of an ellipse about its minor axis. An ellipsoid requires two defining parameters:
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary | |
|---|---|
static DefaultEllipsoid |
CLARKE_1866
Clarke 1866 ellipsoid (EPSG:7008). |
static DefaultEllipsoid |
GRS80
GRS 1980 ellipsoid (EPSG:7019), also called "International 1979". |
static DefaultEllipsoid |
INTERNATIONAL_1924
International 1924 ellipsoid (EPSG:7022). |
static DefaultEllipsoid |
SPHERE
A sphere with a radius of 6371000 metres. |
static DefaultEllipsoid |
WGS72
WGS 1972 ellipsoid (EPSG:7043). |
static DefaultEllipsoid |
WGS84
WGS 1984 ellipsoid (EPSG:7030) used in GPS systems. |
| Fields inherited from class FormattableObject |
|---|
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE |
| Fields inherited from interface IdentifiedObject |
|---|
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY |
| Constructor Summary | |
|---|---|
protected |
DefaultEllipsoid(Ellipsoid ellipsoid)
Constructs a new ellipsoid with the same values than the specified one. |
protected |
DefaultEllipsoid(Map<String,?> properties,
double semiMajorAxis,
double semiMinorAxis,
double inverseFlattening,
boolean ivfDefinitive,
Unit<Length> unit)
Constructs a new ellipsoid using the specified axis length. |
| Method Summary | |
|---|---|
static DefaultEllipsoid |
castOrCopy(Ellipsoid object)
Wraps an arbitrary ellipsoid into a Geotk implementation. |
protected int |
computeHashCode()
Computes a hash value for this identified object. |
static DefaultEllipsoid |
createEllipsoid(Map<String,?> properties,
double semiMajorAxis,
double semiMinorAxis,
Unit<Length> unit)
Constructs a new ellipsoid using the specified axis length. |
static DefaultEllipsoid |
createEllipsoid(String name,
double semiMajorAxis,
double semiMinorAxis,
Unit<Length> unit)
Constructs a new ellipsoid using the specified axis length. |
static DefaultEllipsoid |
createFlattenedSphere(Map<String,?> properties,
double semiMajorAxis,
double inverseFlattening,
Unit<Length> unit)
Constructs a new ellipsoid using the specified axis length and inverse flattening value. |
static DefaultEllipsoid |
createFlattenedSphere(String name,
double semiMajorAxis,
double inverseFlattening,
Unit<Length> unit)
Constructs a new ellipsoid using the specified axis length and inverse flattening value. |
boolean |
equals(Object object,
ComparisonMode mode)
Compare this ellipsoid with the specified object for equality. |
String |
formatWKT(Formatter formatter)
Formats the inner part of a Well Known Text (WKT) element. |
Unit<Length> |
getAxisUnit()
Returns the linear unit of the semi-major and semi-minor axis values. |
double |
getEccentricity()
The ratio of the distance between the center and a focus of the ellipse to the length of its semimajor axis. |
double |
getInverseFlattening()
Returns the value of the inverse of the flattening constant. |
double |
getSemiMajorAxis()
Length of the semi-major axis of the ellipsoid. |
double |
getSemiMinorAxis()
Length of the semi-minor axis of the ellipsoid. |
boolean |
isIvfDefinitive()
Indicates if the inverse flattening is definitive for this ellipsoid. |
boolean |
isSphere()
true if the ellipsoid is degenerate and is actually a sphere. |
double |
orthodromicDistance(double x1,
double y1,
double x2,
double y2)
Returns the orthodromic distance between two geographic coordinates. |
double |
orthodromicDistance(Point2D P1,
Point2D P2)
Returns the orthodromic distance between two geographic coordinates. |
static DefaultEllipsoid |
wrap(Ellipsoid object)
Deprecated. Renamed castOrCopy. |
| Methods inherited from class AbstractIdentifiedObject |
|---|
equals, getAlias, getIdentifier, getIdentifiers, getName, getName, getRemarks, hashCode, nameMatches |
| Methods inherited from class FormattableObject |
|---|
getDefaultIndentation, print, setDefaultIndentation, toString, toWKT, toWKT, toWKT |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface IdentifiedObject |
|---|
getAlias, getIdentifiers, getName, getRemarks, toWKT |
| Field Detail |
|---|
public static final DefaultEllipsoid WGS84
org.geotoolkit packages.
DefaultGeodeticDatum.WGS84public static final DefaultEllipsoid WGS72
DefaultGeodeticDatum.WGS72public static final DefaultEllipsoid GRS80
Note: The NAD83 ellipsoid uses the same semi-axis length and units. The Web Map Server"CRS:83"authority code uses that NAD83 ellipsoid. The"IGNF:MILLER"authority code uses the GRS80 ellipsoid.
public static final DefaultEllipsoid INTERNATIONAL_1924
Note: The European Datum 1950 ellipsoid uses the same semi-axis length and units.
public static final DefaultEllipsoid CLARKE_1866
Note:
The NAD27 ellipsoid uses the same semi-axis length and units.
The Web Map Server "CRS:27" authority code uses that
NAD27 ellipsoid.
public static final DefaultEllipsoid SPHERE
Note: This ellipsoid is close to the GRS 1980 Authalic Sphere (EPSG:7048), which has a radius of 6371007 metres.
DefaultGeodeticDatum.SPHERE| Constructor Detail |
|---|
protected DefaultEllipsoid(Ellipsoid ellipsoid)
ellipsoid - The ellipsoid to copy.castOrCopy(Ellipsoid)
protected DefaultEllipsoid(Map<String,?> properties,
double semiMajorAxis,
double semiMinorAxis,
double inverseFlattening,
boolean ivfDefinitive,
Unit<Length> unit)
properties - Set of properties. Should contains at least "name".semiMajorAxis - The equatorial radius.semiMinorAxis - The polar radius.inverseFlattening - The inverse of the flattening value.ivfDefinitive - true if the inverse flattening is definitive.unit - The units of the semi-major and semi-minor axis values.createEllipsoid(java.lang.String, double, double, javax.measure.unit.Unit) ,
createFlattenedSphere(java.lang.String, double, double, javax.measure.unit.Unit) | Method Detail |
|---|
public static DefaultEllipsoid createEllipsoid(String name,
double semiMajorAxis,
double semiMinorAxis,
Unit<Length> unit)
name - The ellipsoid name.semiMajorAxis - The equatorial radius.semiMinorAxis - The polar radius.unit - The units of the semi-major and semi-minor axis values.
public static DefaultEllipsoid createEllipsoid(Map<String,?> properties,
double semiMajorAxis,
double semiMinorAxis,
Unit<Length> unit)
properties - Set of properties. Should contains at least "name".semiMajorAxis - The equatorial radius.semiMinorAxis - The polar radius.unit - The units of the semi-major and semi-minor axis values.
public static DefaultEllipsoid createFlattenedSphere(String name,
double semiMajorAxis,
double inverseFlattening,
Unit<Length> unit)
name - The ellipsoid name.semiMajorAxis - The equatorial radius.inverseFlattening - The inverse flattening value.unit - The units of the semi-major and semi-minor axis
values.
public static DefaultEllipsoid createFlattenedSphere(Map<String,?> properties,
double semiMajorAxis,
double inverseFlattening,
Unit<Length> unit)
properties - Set of properties. Should contains at least "name".semiMajorAxis - The equatorial radius.inverseFlattening - The inverse flattening value.unit - The units of the semi-major and semi-minor axis
values.
public static DefaultEllipsoid castOrCopy(Ellipsoid object)
orthodromic distance computation (for example) are desired.
If the supplied ellipsoid is already an instance of DefaultEllipsoid or is
null, then it is returned unchanged.
object - The object to get as a Geotk implementation, or null if none.
null if the argument was null.@Deprecated public static DefaultEllipsoid wrap(Ellipsoid object)
castOrCopy.
object - The object to get as a Geotk implementation, or null if none.
public Unit<Length> getAxisUnit()
getAxisUnit in interface Ellipsoidpublic double getSemiMajorAxis()
getSemiMajorAxis in interface Ellipsoidpublic double getSemiMinorAxis()
getSemiMinorAxis in interface Ellipsoidpublic double getEccentricity()
e=sqrt(2f-f²).
public double getInverseFlattening()
isSphere() returns true),
the POSITIVE_INFINITY value is used.
getInverseFlattening in interface Ellipsoidpublic boolean isIvfDefinitive()
isIvfDefinitive in interface Ellipsoidtrue if the inverse flattening is
definitive, or false if the polar radius
is definitive.public boolean isSphere()
true if the ellipsoid is degenerate and is actually a sphere. The sphere is
completely defined by the semi-major axis, which is the
radius of the sphere.
isSphere in interface Ellipsoidtrue if the ellipsoid is degenerate and is actually a sphere.
public double orthodromicDistance(Point2D P1,
Point2D P2)
orthodromicDistance(double,double,double,double).
P1 - Longitude and latitude of first point (in decimal degrees).P2 - Longitude and latitude of second point (in decimal degrees).
public double orthodromicDistance(double x1,
double y1,
double x2,
double y2)
x1 - Longitude of first point (in decimal degrees).y1 - Latitude of first point (in decimal degrees).x2 - Longitude of second point (in decimal degrees).y2 - Latitude of second point (in decimal degrees).
public boolean equals(Object object,
ComparisonMode mode)
equals in interface LenientComparableequals in class AbstractIdentifiedObjectobject - The object to compare to this.mode - STRICT for performing a strict comparison, or
IGNORE_METADATA for comparing only properties
relevant to transformations.
true if both objects are equal.protected int computeHashCode()
AbstractIdentifiedObject.hashCode() when first needed.
Implementation specific feature
In the Geotk implementation, the name, identifiers and remarks are not used for hash code computation.
Consequently two identified objects will return the same hash value if they are equal in the
sense of equals(…,
ComparisonMode.IGNORE_METADATA). This feature allows users to
implement metadata-insensitive HashMap.
computeHashCode in class AbstractIdentifiedObjectpublic String formatWKT(Formatter formatter)
formatWKT in interface FormattableformatWKT in class FormattableObjectformatter - The formatter to use.
"SPHEROID".FormattableObject.toWKT(),
FormattableObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||