| org.geotools.referencing.AbstractIdentifiedObject org.geotools.referencing.datum.DefaultEllipsoid
All known Subclasses: org.geotools.referencing.datum.Spheroid,
DefaultEllipsoid | public class DefaultEllipsoid extends AbstractIdentifiedObject implements Ellipsoid(Code) | | 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:
since: 2.1 version: $Id: DefaultEllipsoid.java 26412 2007-08-01 16:20:25Z aaime $ author: Martin Desruisseaux |
Constructor Summary | |
protected | DefaultEllipsoid(Ellipsoid ellipsoid) Constructs a new ellipsoid with the same values than the specified one.
This copy constructor provides a way to wrap an arbitrary implementation into a
Geotools one or a user-defined one (as a subclass), usually in order to leverage
some implementation-specific API. | protected | DefaultEllipsoid(Map properties, double semiMajorAxis, double semiMinorAxis, double inverseFlattening, boolean ivfDefinitive, Unit unit) Constructs a new ellipsoid using the specified axis length. |
Method Summary | |
static double | check(String name, double value) Checks the argument validity. | public static DefaultEllipsoid | createEllipsoid(String name, double semiMajorAxis, double semiMinorAxis, Unit unit) Constructs a new ellipsoid using the specified axis length. | public static DefaultEllipsoid | createEllipsoid(Map properties, double semiMajorAxis, double semiMinorAxis, Unit unit) Constructs a new ellipsoid using the specified axis length. | public static DefaultEllipsoid | createFlattenedSphere(String name, double semiMajorAxis, double inverseFlattening, Unit unit) Constructs a new ellipsoid using the specified axis length and inverse flattening value. | public static DefaultEllipsoid | createFlattenedSphere(Map properties, double semiMajorAxis, double inverseFlattening, Unit unit) Constructs a new ellipsoid using the specified axis length and
inverse flattening value. | public boolean | equals(AbstractIdentifiedObject object, boolean compareMetadata) Compare this ellipsoid with the specified object for equality.
Parameters: object - The object to compare to this . Parameters: compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. | protected String | formatWKT(Formatter formatter) Format the inner part of a
Well
Known Text (WKT) element.
Parameters: formatter - The formatter to use. | public Unit | getAxisUnit() Returns the linear unit of the
and
axis values. | public double | getEccentricity() The ratio of the distance between the center and a focus of the ellipse
to the length of its semimajor axis. | public double | getInverseFlattening() Returns the value of the inverse of the flattening constant. | public double | getSemiMajorAxis() Length of the semi-major axis of the ellipsoid. | public double | getSemiMinorAxis() Length of the semi-minor axis of the ellipsoid. | public int | hashCode() Returns a hash value for this ellipsoid. | public boolean | isIvfDefinitive() Indicates if the
is definitive for
this ellipsoid. | public boolean | isSphere() true if the ellipsoid is degenerate and is actually a sphere. | public double | orthodromicDistance(Point2D P1, Point2D P2) Returns the orthodromic distance between two geographic coordinates.
The orthodromic distance is the shortest distance between two points
on a sphere's surface. | public double | orthodromicDistance(double x1, double y1, double x2, double y2) Returns the orthodromic distance between two geographic coordinates.
The orthodromic distance is the shortest distance between two points
on a sphere's surface. | public static DefaultEllipsoid | wrap(Ellipsoid ellipsoid) Wraps an arbitrary ellipsoid into a Geotools implementation. |
CLARKE_1866 | final public static DefaultEllipsoid CLARKE_1866(Code) | | Clarke 1866 ellipsoid with axis in
.
since: 2.2 |
INTERNATIONAL_1924 | final public static DefaultEllipsoid INTERNATIONAL_1924(Code) | | International 1924 ellipsoid with axis in
.
|
SPHERE | final public static DefaultEllipsoid SPHERE(Code) | | A sphere with a radius of 6371000
. Spheres use a simplier
algorithm for
, which
may be faster and more robust.
|
WGS84 | final public static DefaultEllipsoid WGS84(Code) | | WGS 1984 ellipsoid with axis in
. This ellipsoid is used
in GPS systems and is the default for most
org.geotools packages.
|
DefaultEllipsoid | protected DefaultEllipsoid(Ellipsoid ellipsoid)(Code) | | Constructs a new ellipsoid with the same values than the specified one.
This copy constructor provides a way to wrap an arbitrary implementation into a
Geotools one or a user-defined one (as a subclass), usually in order to leverage
some implementation-specific API. This constructor performs a shallow copy,
i.e. the properties are not cloned.
since: 2.2 See Also: DefaultEllipsoid.wrap |
DefaultEllipsoid | protected DefaultEllipsoid(Map properties, double semiMajorAxis, double semiMinorAxis, double inverseFlattening, boolean ivfDefinitive, Unit unit)(Code) | | Constructs a new ellipsoid using the specified axis length. The properties map is
given unchanged to the
.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: semiMajorAxis - The equatorial radius. Parameters: semiMinorAxis - The polar radius. Parameters: inverseFlattening - The inverse of the flattening value. Parameters: ivfDefinitive - true if the inverse flattening is definitive. Parameters: unit - The units of the semi-major and semi-minor axis values. See Also: DefaultEllipsoid.createEllipsoid See Also: DefaultEllipsoid.createFlattenedSphere |
check | static double check(String name, double value) throws IllegalArgumentException(Code) | | Checks the argument validity. Argument
value should be greater than zero.
Parameters: name - Argument name. Parameters: value - Argument value. value . throws: IllegalArgumentException - if value is not greater than 0. |
createEllipsoid | public static DefaultEllipsoid createEllipsoid(String name, double semiMajorAxis, double semiMinorAxis, Unit unit)(Code) | | Constructs a new ellipsoid using the specified axis length.
Parameters: name - The ellipsoid name. Parameters: semiMajorAxis - The equatorial radius. Parameters: semiMinorAxis - The polar radius. Parameters: unit - The units of the semi-major and semi-minor axis values. |
createEllipsoid | public static DefaultEllipsoid createEllipsoid(Map properties, double semiMajorAxis, double semiMinorAxis, Unit unit)(Code) | | Constructs a new ellipsoid using the specified axis length. The properties map is
given unchanged to the
.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: semiMajorAxis - The equatorial radius. Parameters: semiMinorAxis - The polar radius. Parameters: unit - The units of the semi-major and semi-minor axis values. |
createFlattenedSphere | public static DefaultEllipsoid createFlattenedSphere(String name, double semiMajorAxis, double inverseFlattening, Unit unit)(Code) | | Constructs a new ellipsoid using the specified axis length and inverse flattening value.
Parameters: name - The ellipsoid name. Parameters: semiMajorAxis - The equatorial radius. Parameters: inverseFlattening - The inverse flattening value. Parameters: unit - The units of the semi-major and semi-minor axisvalues. |
createFlattenedSphere | public static DefaultEllipsoid createFlattenedSphere(Map properties, double semiMajorAxis, double inverseFlattening, Unit unit)(Code) | | Constructs a new ellipsoid using the specified axis length and
inverse flattening value. The properties map is given unchanged to the
.
Parameters: properties - Set of properties. Should contains at least "name" . Parameters: semiMajorAxis - The equatorial radius. Parameters: inverseFlattening - The inverse flattening value. Parameters: unit - The units of the semi-major and semi-minor axisvalues. |
equals | public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)(Code) | | Compare this ellipsoid with the specified object for equality.
Parameters: object - The object to compare to this . Parameters: compareMetadata - true for performing a strict comparaison, or false for comparing only properties relevant to transformations. true if both objects are equal. |
getAxisUnit | public Unit getAxisUnit()(Code) | | Returns the linear unit of the
and
axis values.
The axis linear unit. |
getEccentricity | public double getEccentricity()(Code) | | The ratio of the distance between the center and a focus of the ellipse
to the length of its semimajor axis. The eccentricity can alternately be
computed from the equation: e=sqrt(2f-f²) .
|
getInverseFlattening | public double getInverseFlattening()(Code) | | Returns the value of the inverse of the flattening constant. Flattening is a value
used to indicate how closely an ellipsoid approaches a spherical shape. The inverse
flattening is related to the equatorial/polar radius by the formula
ivf = re/(re-rp).
For perfect spheres (i.e. if
DefaultEllipsoid.isSphere returns
true ),
the
Double.POSITIVE_INFINITY value is used.
The inverse flattening value. |
getSemiMajorAxis | public double getSemiMajorAxis()(Code) | | Length of the semi-major axis of the ellipsoid. This is the
equatorial radius in
.
Length of semi-major axis. |
getSemiMinorAxis | public double getSemiMinorAxis()(Code) | | Length of the semi-minor axis of the ellipsoid. This is the
polar radius in
.
Length of semi-minor axis. |
hashCode | public int hashCode()(Code) | | Returns a hash value for this ellipsoid.
,
and the like are not taken in account.
In other words, two ellipsoids will return the same hash value if they
are equal in the sense of
DefaultEllipsoid.equals equals (AbstractIdentifiedObject, false) .
The hash code value. This value doesn't need to be the samein past or future versions of this class. |
isIvfDefinitive | public boolean isIvfDefinitive()(Code) | | Indicates if the
is definitive for
this ellipsoid. Some ellipsoids use the IVF as the defining value, and calculate the polar
radius whenever asked. Other ellipsoids use the polar radius to calculate the IVF whenever
asked. This distinction can be important to avoid floating-point rounding errors.
true if the isdefinitive, or false if the is definitive. |
isSphere | public boolean isSphere()(Code) | | true if the ellipsoid is degenerate and is actually a sphere. The sphere is
completely defined by the
, which is the
radius of the sphere.
true if the ellipsoid is degenerate and is actually a sphere. |
orthodromicDistance | public double orthodromicDistance(Point2D P1, Point2D P2)(Code) | | Returns the orthodromic distance between two geographic coordinates.
The orthodromic distance is the shortest distance between two points
on a sphere's surface. The default implementation delegates the work
to
DefaultEllipsoid.orthodromicDistance(double,double,double,double) .
Parameters: P1 - Longitude and latitude of first point (in decimal degrees). Parameters: P2 - Longitude and latitude of second point (in decimal degrees). The orthodromic distance (in the units of this ellipsoid). |
orthodromicDistance | public double orthodromicDistance(double x1, double y1, double x2, double y2)(Code) | | Returns the orthodromic distance between two geographic coordinates.
The orthodromic distance is the shortest distance between two points
on a sphere's surface. The orthodromic path is always on a great circle.
This is different from the loxodromic distance, which is a
longer distance on a path with a constant direction on the compass.
Parameters: x1 - Longitude of first point (in decimal degrees). Parameters: y1 - Latitude of first point (in decimal degrees). Parameters: x2 - Longitude of second point (in decimal degrees). Parameters: y2 - Latitude of second point (in decimal degrees). The orthodromic distance (in the units of this ellipsoid's axis). |
wrap | public static DefaultEllipsoid wrap(Ellipsoid ellipsoid)(Code) | | Wraps an arbitrary ellipsoid into a Geotools implementation. This method is usefull if
DefaultEllipsoid.orthodromicDistance 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.
|
Methods inherited from org.geotools.referencing.AbstractIdentifiedObject | protected static Set asSet(Object[] array)(Code)(Java Doc) protected static void ensureAngularUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureLinearUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureNonNull(String name, Object object) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureNonNull(String name, Object[] array, int index) throws IllegalArgumentException(Code)(Java Doc) protected static void ensureTimeUnit(Unit unit) throws IllegalArgumentException(Code)(Java Doc) final public boolean equals(Object object)(Code)(Java Doc) public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(IdentifiedObject object1, IdentifiedObject object2, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(IdentifiedObject[] array1, IdentifiedObject[] array2, boolean compareMetadata)(Code)(Java Doc) protected static boolean equals(Collection collection1, Collection collection2, boolean compareMetadata)(Code)(Java Doc) public Collection getAlias()(Code)(Java Doc) public ReferenceIdentifier getIdentifier(Citation authority)(Code)(Java Doc) public static ReferenceIdentifier getIdentifier(IdentifiedObject info, Citation authority)(Code)(Java Doc) public Set getIdentifiers()(Code)(Java Doc) public ReferenceIdentifier getName()(Code)(Java Doc) public String getName(Citation authority)(Code)(Java Doc) public static String getName(IdentifiedObject info, Citation authority)(Code)(Java Doc) public static Map getProperties(IdentifiedObject info)(Code)(Java Doc) public static Map getProperties(IdentifiedObject info, Citation authority)(Code)(Java Doc) public InternationalString getRemarks()(Code)(Java Doc) public int hashCode()(Code)(Java Doc) public boolean nameMatches(String name)(Code)(Java Doc) public static boolean nameMatches(IdentifiedObject object, String name)(Code)(Java Doc) public static boolean nameMatches(IdentifiedObject o1, IdentifiedObject o2)(Code)(Java Doc)
|
|
|