# Package org.opengis.referencing.cs

A coordinate system shall be composed of a non-repeating sequence of coordinate system axes.
One `CoordinateSystem`

(CS) instance may be used by multiple
CoordinateReferenceSystem (CRS) instances.
The dimension of the coordinate space, the names, the units of measure, the directions
and sequence of the axes shall be part of the coordinate system definition.
The number of axes shall be equal to the dimension of the space of which it describes the geometry.
It is therefore not permitted to supply a coordinate tuple with two heights of different definition.

The number of coordinates in a coordinate tuple shall be equal to the number of coordinate axes in the coordinate system. Coordinates in coordinate tuples shall be supplied in the order in which the coordinate system's axes are defined.

A coordinate system implies how coordinates are calculated from geometric elements such as distances and angles and vice versa. The calculus required to derive angles and distances from point coordinates and vice versa in a map plane is simple Euclidean 2D arithmetic. To do the same on the surface of an ellipsoid (curved 2D space) involves more complex ellipsoidal calculus. These rules cannot be specified in detail, but are implied in the geometric properties of the coordinate space.

### Coordinate system types and unions

Coordinate systems are divided into subtypes by the geometric properties of the coordinate space spanned and the geometric properties of the axes themselves (straight or curved; perpendicular or not). Certain subtypes of coordinate system shall be used only with specific subtypes of coordinate reference system. The restrictions are documented in the javadoc of each CRS subtype.

ISO 19111 defines three coordinate system *unions* in addition to the coordinate system *types*.
Each union enumerates the coordinate system types that can be associated to a CRS type.
However the `union`

construct found in some languages like C/C++ is not available in Java.
GeoAPI workarounds this limitation in different ways:

Union | Types in the union | GeoAPI approach |

`GeodeticCS` |
`CartesianCS` ,
`EllipsoidalCS` ,
`SphericalCS` |
Provides a `GeographicCRS` type for the `EllipsoidalCS` case.
Provides distinct `CRSFactory` methods for the `CartesianCS`
and `SphericalCS` cases. |

`EngineeringCS` |
`AffineCS` ,
`CartesianCS` ,
`CylindricalCS` ,
`LinearCS` ,
`PolarCS` ,
`SphericalCS` ,
`UserDefinedCS` . |
No workaround in the API. Verified by the conformance tests. |

`ImageCS` |
`AffineCS` ,
`CartesianCS` |
Defines `CartesianCS` as a special case of `AffineCS` . |

- Since:
- 1.0

**Departure from OGC/ISO specification:**

ISO 19111 defines

`GeodeticCS`

, `EngineeringCS`

and `ImageCS`

unions.
However the `union`

construct found in some languages like C/C++ is not available in Java.
For each union, a different approach has been applied and documented in the `org.opengis.referencing.cs`

package. In the particular case of `ImageCS`

, the same type-safety objective can be obtained
through a slight change in the interface hierarchy.-
Interface Summary Interface Description AffineCS A 2- or 3-dimensional coordinate system with straight axes that are not necessarily orthogonal.CartesianCS A 2- or 3-dimensional coordinate system with orthogonal straight axes.CoordinateSystem The set of coordinate system axes that spans a given coordinate space.CoordinateSystemAxis Definition of a coordinate system axis.CSAuthorityFactory Creates coordinate systems using authority codes.CSFactory Builds up complex coordinate systems from simpler objects or values.CylindricalCS A 3-dimensional coordinate system consisting of a`PolarCS`

extended by a straight axis perpendicular to the plane spanned by the polar CS.EllipsoidalCS A 2- or 3-dimensional coordinate system in which position is specified by geodetic latitude, geodetic longitude, and (in the 3D case) ellipsoidal height.LinearCS A 1-dimensional coordinate system that consists of the points that lie on the single axis described.ParametricCS A 1-dimensional coordinate system containing a single axis.PolarCS A 2-dimensional coordinate system in which position is specified by the distance from the origin and the angle between the line from the origin to a point and a reference direction.SphericalCS A 3-dimensional coordinate system with one distance measured from the origin and two angular coordinates.TimeCS A 1-dimensional coordinate system containing a single time axis.UserDefinedCS A 2- or 3-dimensional coordinate system that consists of any combination of axes not covered by any other CS type.VerticalCS A 1-dimensional coordinate system used to record the heights or depths of points. -
Class Summary Class Description AxisDirection The direction of positive increase in the coordinate value for a coordinate system axis.RangeMeaning Meaning of the axis value range specified through minimum value and maximum value.