deegree 2.1 (2007/11/08 09:57 build-328-official)

org.deegree.model.csct.cs
Class AxisOrientation

java.lang.Object
  extended by javax.media.jai.EnumeratedParameter
      extended by org.deegree.model.csct.cs.AxisOrientation
All Implemented Interfaces:
Serializable, Comparable

public final class AxisOrientation
extends javax.media.jai.EnumeratedParameter
implements Comparable

Orientation of axis. Some coordinate systems use non-standard orientations. For example, the first axis in South African grids usually points West, instead of East. This information is obviously relevant for algorithms converting South African grid coordinates into Lat/Long.

The natural ordering for axis orientations is defined as (EAST-WEST), (NORTH-SOUTH), (UP-DOWN), (FUTURE-PAST) and OTHER, which is the ordering for a (x,y,z,t) coordinate system. This means that when an array of AxisOrientations is sorted using Arrays.sort(Object[]), EAST and WEST orientations will appears first. NORTH and SOUTH will be next, followed by UP and DOWN, etc. Care should be exercised if AxisOrientations are to be used as keys in a sorted map or elements in a sorted set, as AxisOrientation's natural ordering is inconsistent with equals. See Comparable, SortedMap or SortedSet for more information.

Version:
1.00, $Revision: 6259 $, $Date: 2007-03-20 10:15:15 +0100 (Di, 20 Mär 2007) $
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux, last edited by: $Author: bezema $
See Also:
"org.opengis.cs.CS_AxisOrientationEnum", Serialized Form

Field Summary
static int CS_AO_Down
          Increasing ordinates values go down.
static int CS_AO_East
          Increasing ordinates values go East.
static int CS_AO_North
          Increasing ordinates values go North.
static int CS_AO_Other
          Unknown or unspecified axis orientation.
static int CS_AO_South
          Increasing ordinates values go South.
static int CS_AO_Up
          Increasing ordinates values go up.
static int CS_AO_West
          Increasing ordinates values go West.
static AxisOrientation DOWN
          Increasing ordinates values go down.
static AxisOrientation EAST
          Increasing ordinates values go East.
static AxisOrientation FUTURE
          Increasing time go toward future.
static AxisOrientation NORTH
          Increasing ordinates values go North.
static AxisOrientation OTHER
          Unknown or unspecified axis orientation.
static AxisOrientation PAST
          Increasing time go toward past.
static AxisOrientation SOUTH
          Increasing ordinates values go South.
static AxisOrientation UP
          Increasing ordinates values go up.
static AxisOrientation WEST
          Increasing ordinates values go West.
 
Method Summary
 AxisOrientation absolute()
          Returns the "absolute" orientation of this axis.
 int compareTo(Object ao)
          Compares this AxisOrientation with the specified orientation.
static AxisOrientation getEnum(int value)
          Return the enum for the specified value.
 String getName(Locale locale)
          Returns this enum's name in the specified locale.
 AxisOrientation inverse()
          Returns the opposite orientation of this axis.
 
Methods inherited from class javax.media.jai.EnumeratedParameter
equals, getName, getValue, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CS_AO_Other

public static final int CS_AO_Other
Unknown or unspecified axis orientation. This can be used for local or fitted coordinate systems.

See Also:
Constant Field Values

CS_AO_North

public static final int CS_AO_North
Increasing ordinates values go North. This is usually used for Grid Y coordinates and Latitude.

See Also:
Constant Field Values

CS_AO_South

public static final int CS_AO_South
Increasing ordinates values go South. This is rarely used.

See Also:
Constant Field Values

CS_AO_East

public static final int CS_AO_East
Increasing ordinates values go East. This is rarely used.

See Also:
Constant Field Values

CS_AO_West

public static final int CS_AO_West
Increasing ordinates values go West. This is usually used for Grid X coordinates and Longitude.

See Also:
Constant Field Values

CS_AO_Up

public static final int CS_AO_Up
Increasing ordinates values go up. This is used for vertical coordinate systems.

See Also:
Constant Field Values

CS_AO_Down

public static final int CS_AO_Down
Increasing ordinates values go down. This is used for vertical coordinate systems.

See Also:
Constant Field Values

OTHER

public static final AxisOrientation OTHER
Unknown or unspecified axis orientation. This can be used for local or fitted coordinate systems.

See Also:
"org.opengis.cs.CS_AxisOrientationEnum#CS_AO_Other"

NORTH

public static final AxisOrientation NORTH
Increasing ordinates values go North. This is usually used for Grid Y coordinates and Latitude.

See Also:
"org.opengis.cs.CS_AxisOrientationEnum#CS_AO_North"

SOUTH

public static final AxisOrientation SOUTH
Increasing ordinates values go South.

See Also:
"org.opengis.cs.CS_AxisOrientationEnum#CS_AO_South"

EAST

public static final AxisOrientation EAST
Increasing ordinates values go East. This is usually used for Grid X coordinates and Longitude.

See Also:
"org.opengis.cs.CS_AxisOrientationEnum#CS_AO_East"

WEST

public static final AxisOrientation WEST
Increasing ordinates values go West.

See Also:
"org.opengis.cs.CS_AxisOrientationEnum#CS_AO_West"

UP

public static final AxisOrientation UP
Increasing ordinates values go up. This is used for vertical coordinate systems.

See Also:
"org.opengis.cs.CS_AxisOrientationEnum#CS_AO_Up"

DOWN

public static final AxisOrientation DOWN
Increasing ordinates values go down. This is used for vertical coordinate systems.

See Also:
"org.opengis.cs.CS_AxisOrientationEnum#CS_AO_Down"

FUTURE

public static final AxisOrientation FUTURE
Increasing time go toward future. This is used for temporal axis.


PAST

public static final AxisOrientation PAST
Increasing time go toward past. This is used for temporal axis.

Method Detail

getEnum

public static AxisOrientation getEnum(int value)
                               throws NoSuchElementException
Return the enum for the specified value. This method is provided for compatibility with "org.opengis.cs.CS_AxisOrientationEnum".

Parameters:
value - The enum value.
Returns:
The enum for the specified value.
Throws:
NoSuchElementException - if there is no enum for the specified value.

getName

public String getName(Locale locale)
Returns this enum's name in the specified locale. If no name is available for the specified locale, a default one will be used.

Parameters:
locale - The locale, or null for the default locale.
Returns:
Enum's name in the specified locale.

inverse

public AxisOrientation inverse()
Returns the opposite orientation of this axis. The opposite of North is South, and the opposite of South is North. The same apply to East-West, Up-Down and Future-Past. Other axis orientation are returned inchanged.

Returns:
the opposite orientation of this axis. The opposite of North is South, and the opposite of South is North. The same apply to East-West, Up-Down and Future-Past. Other axis orientation are returned inchanged.

absolute

public AxisOrientation absolute()
Returns the "absolute" orientation of this axis. This "absolute" operation is similar to the Math.abs(int) method in that "negative" orientation (SOUTH, WEST, DOWN, PAST) are changed for their positive counterpart (NORTH, EAST, UP, FUTURE). More specifically, the following conversion table is applied.
 
  Orientation     Absolute value  
NORTH NORTH
SOUTH NORTH
EAST EAST
WEST EAST
UP UP
DOWN UP
FUTURE FUTURE
PAST FUTURE
OTHER OTHER

Returns:
the "absolute" orientation of this axis.

compareTo

public int compareTo(Object ao)
Compares this AxisOrientation with the specified orientation. The natural ordering is defined as (EAST-WEST), (NORTH-SOUTH), (UP-DOWN), (FUTURE-PAST) and OTHER, which is the ordering for a (x,y,z,t) coordinate system. Two AxisOrientation that are among the same axis but with an opposite direction (e.g. EAST vs WEST) are considered equal by this method.

Specified by:
compareTo in interface Comparable
Parameters:
ao - An AxisOrientation object to be compared with.
Returns:
Throws:
ClassCastException - if ao is not an AxisOrientation object.

deegree 2.1 (2007/11/08 09:57 build-328-official)

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://deegree.sourceforge.net