Class DefaultCompoundCRS

All Implemented Interfaces:
Serializable, Formattable, Deprecable, Lenient­Comparable, Compound­CRS, Coordinate­Reference­System, Identified­Object, Reference­System

public class DefaultCompoundCRS extends AbstractCRS implements CompoundCRS
A CRS describing the position of points through two or more independent coordinate reference systems. This class is often used for defining 4-dimensional (x,y,z,t) coordinate reference systems as an aggregation of simpler CRS. Below is two examples of such aggregations:

Flat list

Compound­CRS — (x, y, z, t)
  ├─Projected­CRS — (x, y)
  ├─Vertical­CRS — (z)
  └─Temporal­CRS — (t)

Hierarchical structure

Compound­CRS — (x, y, z, t)
  ├─Compound­CRS — (x, y, z)
  │   ├─Projected­CRS — (x, y)
  │   └─Vertical­CRS — (z)
  └─Temporal­CRS — (t)
Strictly speaking, only the flat list on the left side is allowed by OGC/ISO specifications. However Apache SIS relaxes this rule by allowing hierarchies as shown on the right side. This flexibility allows SIS to preserve information about the (x,y,z) part (e.g. the EPSG identifier) that would otherwise been lost. Users can obtain the list of their choice by invoking get­Single­Components() or get­Components() respectively.

Component order

ISO 19162 restricts compound CRS to the following components in that order:
  • A mandatory horizontal CRS (only one of two-dimensional Geographic­CRS or Projected­CRS or Engineering­CRS).
  • Optionally followed by a Vertical­CRS or a Parametric­CRS (but not both).
  • Optionally followed by a Temporal­CRS.
SIS currently does not enforce those restrictions. In particular:
  • Components may appear in different order.
  • Vertical­CRS + Temporal­CRS (without horizontal component) is accepted.
  • Geocentric­CRS or three-dimensional Geographic­CRS can be combined with Temporal­CRS.
However users are encouraged to follow ISO 19162 restriction for better portability.

Immutability and thread safety

This class is immutable and thus thread-safe if the property values (not necessarily the map itself) and all Coordinate­Reference­System instances given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if all components were created using only SIS factories and static constants.
Since:
0.4
See Also:

Defined in the sis-referencing module