public final class DirectionAlongMeridian extends Object implements Comparable, Serializable
Modifier and Type | Field and Description |
---|---|
AxisDirection |
baseDirection
The base direction, which must be
AxisDirection.NORTH or AxisDirection.SOUTH . |
double |
meridian
The meridian, in degrees.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public final AxisDirection baseDirection
AxisDirection.NORTH
or AxisDirection.SOUTH
.public final double meridian
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)
public int hashCode()
equals(java.lang.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.Copyright © 1996–2019 Geotools. All rights reserved.