org.geotools.cs
Class AxisOrientation

java.lang.Object
  extended byjavax.media.jai.EnumeratedParameter
      extended byorg.geotools.cs.AxisOrientation
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

Deprecated. Replaced by AxisDirection.

public final class AxisOrientation
extends javax.media.jai.EnumeratedParameter
implements java.lang.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 appear 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:
$Id: AxisOrientation.java 17672 2006-01-19 00:25:55Z desruisseaux $
Author:
OpenGIS (www.opengis.org), Martin Desruisseaux
See Also:
CS_AxisOrientationEnum, Serialized Form

Field Summary
 org.opengis.referencing.cs.AxisDirection direction
          Deprecated. The direction according new (GeoAPI) constants, or null if unknow.
static AxisOrientation DOWN
          Deprecated. Replaced by AxisDirection.DOWN.
static AxisOrientation EAST
          Deprecated. Replaced by AxisDirection.EAST.
static AxisOrientation FUTURE
          Deprecated. Replaced by AxisDirection.FUTURE.
static AxisOrientation NORTH
          Deprecated. Replaced by AxisDirection.NORTH.
static AxisOrientation OTHER
          Deprecated. Replaced by AxisDirection.OTHER.
static AxisOrientation PAST
          Deprecated. Replaced by AxisDirection.PAST.
static AxisOrientation SOUTH
          Deprecated. Replaced by AxisDirection.SOUTH.
static AxisOrientation UP
          Deprecated. Replaced by AxisDirection.UP.
static AxisOrientation WEST
          Deprecated. Replaced by AxisDirection.WEST.
 
Method Summary
 AxisOrientation absolute()
          Deprecated. Returns the "absolute" orientation of this axis.
 int compareTo(java.lang.Object ao)
          Deprecated. Compares this AxisOrientation with the specified orientation.
static AxisOrientation getEnum(int value)
          Deprecated. Returns the enum for the specified value.
static AxisOrientation getEnum(java.lang.String name)
          Deprecated. Returns the enum for the specified name.
static AxisOrientation getEnum(java.lang.String name, java.util.Locale locale)
          Deprecated. Returns the enum for the specified localized name.
 java.lang.String getName(java.util.Locale locale)
          Deprecated. Returns this enum's name in the specified locale.
 AxisOrientation inverse()
          Deprecated. 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

OTHER

public static final AxisOrientation OTHER
Deprecated. Replaced by AxisDirection.OTHER.

Unknown or unspecified axis orientation. This can be used for local or fitted coordinate systems.

See Also:
CS_AxisOrientationEnum.CS_AO_Other

NORTH

public static final AxisOrientation NORTH
Deprecated. Replaced by AxisDirection.NORTH.

Increasing ordinates values go North. This is usually used for Grid Y coordinates and Latitude.

See Also:
CS_AxisOrientationEnum.CS_AO_North

SOUTH

public static final AxisOrientation SOUTH
Deprecated. Replaced by AxisDirection.SOUTH.

Increasing ordinates values go South.

See Also:
CS_AxisOrientationEnum.CS_AO_South

EAST

public static final AxisOrientation EAST
Deprecated. Replaced by AxisDirection.EAST.

Increasing ordinates values go East. This is usually used for Grid X coordinates and Longitude.

See Also:
CS_AxisOrientationEnum.CS_AO_East

WEST

public static final AxisOrientation WEST
Deprecated. Replaced by AxisDirection.WEST.

Increasing ordinates values go West.

See Also:
CS_AxisOrientationEnum.CS_AO_West

UP

public static final AxisOrientation UP
Deprecated. Replaced by AxisDirection.UP.

Increasing ordinates values go up. This is used for vertical coordinate systems.

See Also:
CS_AxisOrientationEnum.CS_AO_Up

DOWN

public static final AxisOrientation DOWN
Deprecated. Replaced by AxisDirection.DOWN.

Increasing ordinates values go down. This is used for vertical coordinate systems.

See Also:
CS_AxisOrientationEnum.CS_AO_Down

FUTURE

public static final AxisOrientation FUTURE
Deprecated. Replaced by AxisDirection.FUTURE.

Increasing time go toward future. This is used for temporal axis.


PAST

public static final AxisOrientation PAST
Deprecated. Replaced by AxisDirection.PAST.

Increasing time go toward past. This is used for temporal axis.


direction

public final org.opengis.referencing.cs.AxisDirection direction
Deprecated. 
The direction according new (GeoAPI) constants, or null if unknow. This field is provided for interoperability with new GeoAPI interfaces.

Method Detail

getEnum

public static AxisOrientation getEnum(int value)
                               throws java.util.NoSuchElementException
Deprecated. 
Returns the enum for the specified value. This method is provided for compatibility with CS_AxisOrientationEnum.

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

getEnum

public static AxisOrientation getEnum(java.lang.String name)
Deprecated. 
Returns the enum for the specified name. Search is case and locale insensitive.

Parameters:
name - One of the constant values (NORTH, SOUTH, etc.)
Returns:
The enum for the specified name.
Throws:
java.util.NoSuchElementException - if there is no enum for the specified name.

getEnum

public static AxisOrientation getEnum(java.lang.String name,
                                      java.util.Locale locale)
Deprecated. 
Returns the enum for the specified localized name. Search is case-insensitive.

Parameters:
name - The localized name (e.g. "Nord", "Sud", "Est", "Ouest", etc.)
locale - The locale, or null for the default locale.
Returns:
The enum for the specified localized name.
Throws:
java.util.NoSuchElementException - if there is no enum for the specified name.

getName

public java.lang.String getName(java.util.Locale locale)
Deprecated. 
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()
Deprecated. 
Returns the opposite orientation of this axis. The opposite of North is South, and the opposite of South is North. The same applies to East-West, Up-Down and Future-Past. Other axis orientations are returned unchanged.


absolute

public AxisOrientation absolute()
Deprecated. 
Returns the "absolute" orientation of this axis. This "absolute" operation is similar to the Math.abs(int) method in that "negative" orientations (SOUTH, WEST, DOWN, PAST) are changed for their positive counterparts (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
FUTUREFUTURE
PAST FUTURE
OTHER OTHER


compareTo

public int compareTo(java.lang.Object ao)
Deprecated. 
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 AxisOrientations that are along the same axis but with an opposite direction (e.g. EAST vs WEST) are considered equal by this method.

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


Copyright © GeoTools. All Rights Reserved.