|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectDirectionAlongMeridian
public final class DirectionAlongMeridian
Parses axis direction of the kind "South along 90 deg East". Those directions are used in the EPSG database for polar stereographic projections.
Field Summary | |
---|---|
AxisDirection |
baseDirection
The base direction, which must be AxisDirection.NORTH or
AxisDirection.SOUTH . |
double |
meridian
The meridian, in degrees. |
Method Summary | |
---|---|
int |
compareTo(Object object)
Compares this direction with the specified one for order. |
boolean |
equals(Object object)
Tests this object for equality with the specified one. |
double |
getAngle(DirectionAlongMeridian other)
Returns the arithmetic (counterclockwise) angle from this direction to the specified direction, in decimal degrees. |
AxisDirection |
getDirection()
Returns the axis direction for this object. |
int |
hashCode()
Returns a hash code value, for consistency with equals(java.lang.Object) . |
static DirectionAlongMeridian |
parse(AxisDirection direction)
Returns the dimension along meridian for the specified axis direction, or null if
none. |
static DirectionAlongMeridian |
parse(String name)
If the specified name is a direction along some specific meridian, returns information about that. |
String |
toString()
Returns a string representation of this direction, using a syntax matching the one used by EPSG. |
Methods inherited from class Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final AxisDirection baseDirection
AxisDirection.NORTH
or
AxisDirection.SOUTH
.
public final double meridian
Method Detail |
---|
public static DirectionAlongMeridian parse(AxisDirection direction)
null
if
none.
public static DirectionAlongMeridian parse(String name)
null
.
public AxisDirection getDirection()
public double getAngle(DirectionAlongMeridian other)
NaN
if the base directions 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°.
public int compareTo(Object object)
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 |
compareTo
in interface Comparable
public boolean equals(Object object)
equals
in class Object
public int hashCode()
equals(java.lang.Object)
.
hashCode
in class Object
public String toString()
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.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |