psg.org">EPSG database use the opposite axis order.
It is better to avoid this class if you can. This class exists primarily for compatibility with external data or applications that assume (longitude, latitude) axis order no matter what the EPSG database said, for example Shapefiles.
The axis order can be specified at construction time as an array of {@linkplain AxisDirection axis directions}. If no such array is explicitly specified, then the default order is {@linkplain AxisDirection#EAST East}, {@linkplain AxisDirection#EAST_NORTH_EAST East-North-East}, {@linkplain AxisDirection#NORTH_EAST North-East}, {@linkplain AxisDirection#NORTH_NORTH_EAST North-North-East}, {@linkplain AxisDirection#NORTH North}, {@linkplain AxisDirection#UP Up}, {@linkplain AxisDirection#GEOCENTRIC_X Geocentric X}, {@linkplain AxisDirection#GEOCENTRIC_Y Geocentric Y}, {@linkplain AxisDirection#GEOCENTRIC_Z Geocentric Z}, {@linkplain AxisDirection#COLUMN_POSITIVE Column}, {@linkplain AxisDirection#ROW_POSITIVE Row}, {@linkplain AxisDirection#DISPLAY_RIGHT Display right}, {@linkplain AxisDirection#DISPLAY_UP Display up} and{@linkplain AxisDirection#FUTURE Future}. This means that, for example, axis with East or West direction will be placed before any axis with North or South direction. Axis directions not specified in the table (for example {@link AxisDirection#OTHER OTHER}) will be ordered last. This is somewhat equivalent to the ordering of {@link Double#NaN NaN} values in an array of {@code double}.
Notes:
- This class compares only the " {@linkplain AxisDirection#absolute absolute}" axis directions, so North and South are considered equivalent.
- The default direction order may changes in future Geotools version in order to fit what appears to be the most common usage on the market.
- The actual axis ordering is determined by the {@link #compare compare} methodimplementation. Subclasses may override this method if the want to provide a more sophesticated axis ordering.
For some authority factories, an instance of this class can be obtained by passing a {@link Hints#FORCE_LONGITUDE_FIRST_AXIS_ORDER FORCE_LONGITUDE_FIRST_AXIS_ORDER} hintto the {@linkplain ReferencingFactoryFinder#getCRSAuthorityFactory FactoryFinder.getCRSAuthorityFactory}(...)
method. Whatever this hint is supported or not is authority dependent. Example:
Hints hints = new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE); CRSAuthorityFactory factory = FactoryFinder.getCRSAuthorityFactory("EPSG", hints); CoordinateReferenceSystem crs = factory.createCoordinateReferenceSystem("EPSG:4326");
This class is named
ordered axis authority factory instead of something like
longitude first axis order because the axis order can be user-supplied. The (
longitude,
latitude) order just appears to be the default one.
@since 2.2
@source $URL$
@version $Id$
@author Martin Desruisseaux (IRD)
@see Hints#FORCE_LONGITUDE_FIRST_AXIS_ORDER
@see Hints#FORCE_STANDARD_AXIS_UNITS
@tutorial http://docs.codehaus.org/display/GEOTOOLS/The+axis+order+issue