public enum AxesConvention extends Enum<AxesConvention>
Enumeration values are inferred from the properties of given CoordinateSystem
instances.
This enumeration does not add new information and does not aim to cover all possible conventions – it is
only a convenience for identifying some common patterns.
GeographicCRS
, for some ProjectedCRS
in the South hemisphere (South Africa, Australia, etc.)
and for some polar projections among others.
Recent OGC standards mandate the use of axis order as defined by the authority. Oldest OGC standards used the
(x,y) axis order instead, ignoring any authority specification. Many softwares still use the
old (x,y) axis order, because it is easier to implement. Apache SIS supports both conventions.
By default, SIS creates CRS with axis order as defined by the authority. Those CRS are created by calls to the
CRS.forCode(String)
method. The actual axis order can be verified after the CRS
creation with System.out.println(crs)
. If (x,y) axis order is wanted for compatibility
with older OGC specifications or other softwares, CRS forced to "longitude first" axis order can be created using the
RIGHT_HANDED
or NORMALIZED
enumeration value.
6.7.2 Map CS — The usual orientation of the Map CS shall be such that the i axis is parallel to the East-to-West axis of the Layer CRS and increases Eastward, and the j axis is parallel to the North-to-South axis of the Layer CRS and increases Southward. This orientation will not be possible in some cases, as (for example) in an orthographic projection over the South Pole. The convention to be followed is that, wherever possible, East shall be to the right edge and North shall be toward the upper edge of the Map CS.In addition to WMS, Apache SIS uses normalized coordinate systems in map projections. More information are provided in the Axis units and directions section of map projection package.
Math
trigonometric functions like atan2(y,x)
.
However some data use the [0 … 360]° range instead. A geographic CRS can be shifted to that range of longitude values
using the POSITIVE_RANGE
enumeration value. The choice of longitude range will impact not only some
coordinate conversions, but also the methods that verify the domain of validity
(e.g. GeneralEnvelope.normalize()
).AbstractCS.forConvention(AxesConvention)
Defined in the sis-referencing
module
Enum Constant and Description |
---|
NORMALIZED
Axes order, direction and units are forced to commonly used pre-defined values.
|
POSITIVE_RANGE
Axes having a wraparound
range meaning
are shifted to their ranges of positive values.
|
RIGHT_HANDED
Axes are reordered for a right-handed coordinate system.
|
Modifier and Type | Method and Description |
---|---|
static AxesConvention |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static AxesConvention[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AxesConvention NORMALIZED
SOUTH
→ NORTH
):
EAST
, NORTH
,
UP
, FUTURE
—
commonly used (x, y, z, t) directions for coordinates.DISPLAY_RIGHT
, DISPLAY_DOWN
—
commonly used (x, y) directions for screen devices.ROW_POSITIVE
,
COLUMN_POSITIVE
— indices in grids or matrices.NonSI.DEGREE_ANGLE
.SI.METRE
.NonSI.DAY
.RIGHT_HANDED
enum instead.CommonCRS.normalizedGeographic()
public static final AxesConvention RIGHT_HANDED
This enum is often used for deriving a coordinate system with the (longitude, latitude) or (x,y) axis order. While it works in many cases, note that a right-handed coordinate system does not guarantee that longitude or x axis will be first in every cases. The most notable exception is the (North, West) case.
Left-handed | Right-handed | Remarks |
---|---|---|
(North, East) | (East, North) | This is the most common case. |
(West, North) | (North, West) | This right-handed system has latitude first. |
(South, West) | (West, South) | Used for the mapping of southern Africa. |
(South along 0°, South along 90° West) |
(South along 90° West, South along 0°) | Can be used for the mapping of North pole. |
public static final AxesConvention POSITIVE_RANGE
The most frequent usage of this enum is for shifting longitude values from the [-180 … +180]° range to the [0 … 360]° range. However this enum could also be used with climatological calendars if their time axis has a wrapround range meaning.
RangeMeaning.WRAPAROUND
public static AxesConvention[] values()
for (AxesConvention c : AxesConvention.values()) System.out.println(c);
public static AxesConvention valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.