| java.lang.Object org.geotools.referencing.cs.DirectionAlongMeridian
DirectionAlongMeridian | final class DirectionAlongMeridian implements Comparable,Serializable(Code) | | Parses
of the kind
"South along 90 deg East". Those directions are
used in the EPSG database for polar stereographic projections.
version: $Id: DirectionAlongMeridian.java 28264 2007-12-05 21:53:08Z desruisseaux $ author: Martin Desruisseaux |
Field Summary | |
final static double | EPS For floating point comparaisons. | final public AxisDirection | baseDirection The base direction, which must be
AxisDirection.NORTH or
AxisDirection.SOUTH . | final public double | meridian The meridian, in degrees. |
Method Summary | |
public int | compareTo(Object object) Compares this direction with the specified one for order. | public boolean | equals(Object object) Tests this object for equality with the specified one. | static AxisDirection | findDirection(String direction) Searchs for the specified name. | public double | getAngle(DirectionAlongMeridian other) Returns the arithmetic (counterclockwise) angle from this direction to the specified
direction, in decimal degrees. | public AxisDirection | getDirection() Returns the axis direction for this object. | public int | hashCode() Returns a hash code value, for consistency with
DirectionAlongMeridian.equals . | public static DirectionAlongMeridian | parse(AxisDirection direction) Returns the dimension along meridian for the specified axis direction, or
null if
none. | public static DirectionAlongMeridian | parse(String name) If the specified name is a direction along some specific meridian,
returns information about that. | public String | toString() Returns a string representation of this direction, using a syntax matching the one used
by EPSG. |
EPS | final static double EPS(Code) | | For floating point comparaisons.
|
baseDirection | final public AxisDirection baseDirection(Code) | | The base direction, which must be
AxisDirection.NORTH or
AxisDirection.SOUTH .
|
meridian | final public double meridian(Code) | | The meridian, in degrees.
|
compareTo | public int compareTo(Object object)(Code) | | Compares this direction with the specified one for order. This method tries to reproduce
the ordering used for the majority of coordinate systems in the EPSG database, i.e. the
ordering of a right-handed coordinate system. Examples of ordered pairs that we should
get (extracted from the EPSG database):
North along 90 deg East, | North along 0 deg |
North along 75 deg West, | North along 165 deg West |
South along 90 deg West, | South along 0 deg |
South along 180 deg, | South along 90 deg West |
North along 130 deg West | North along 140 deg East |
|
equals | public boolean equals(Object object)(Code) | | Tests this object for equality with the specified one.
This method is used mostly for assertions.
|
findDirection | static AxisDirection findDirection(String direction)(Code) | | Searchs for the specified name.
|
getAngle | public double getAngle(DirectionAlongMeridian other)(Code) | | Returns the arithmetic (counterclockwise) angle from this direction to the specified
direction, in decimal degrees. This method returns a value between -180� and +180�, or
Double.NaN NaN if the
don't match.
A positive angle denote a right-handed system.
Example: the angle from "North along 90 deg East" to
"North along 0 deg is 90�.
|
getDirection | public AxisDirection getDirection()(Code) | | Returns the axis direction for this object. If a suitable axis direction already exists,
it will be returned. Otherwise a new one is created and returned.
|
parse | public static DirectionAlongMeridian parse(AxisDirection direction)(Code) | | Returns the dimension along meridian for the specified axis direction, or
null if
none.
|
parse | public static DirectionAlongMeridian parse(String name)(Code) | | If the specified name is a direction along some specific meridian,
returns information about that. Otherwise returns
null .
|
toString | public String toString()(Code) | | Returns a string representation of this direction, using a syntax matching the one used
by EPSG. This string representation will be used for creating a new
AxisDirection .
The generated name should be identical to EPSG name, but we use the generated one anyway
(rather than the one provided by EPSG) in order to make sure that we create a single
AxisDirection for a given direction; we avoid potential differences like lower
versus upper cases, amount of white space, etc.
|
|
|