# Package org.apache.sis.referencing.operation

Relationship between any two Coordinate Reference Systems (CRS). An explanation for this package is provided in the OpenGIS® javadoc. The remaining discussion on this page is specific to the Apache SIS implementation.

This package provides an ISO 19111 Coordinate Operation implementation and support classes. The actual transform work is performed by the following sub-packages, but most users will not need to deal with them directly:

- `org​.apache​.sis​.referencing​.operation​.projection` — map projections,
- `org​.apache​.sis​.referencing​.operation​.transform` — any transform other than map projections.

Apache SIS extensions
Some SIS implementations provide additional methods that are not part of OGC/ISO specifications:

- `AbstractCoordinateOperation​.getLinearAccuracy()` — tries to convert the accuracy to metres,
- `DefaultConversion​.specialize(…)` — changes a defining conversion into a complete conversion.

Apache SIS specific behavior
The following operations have a behavior in Apache SIS which may be different than the behavior found in other software products. Those particularities apply only when the math transform is created directly. Users do not need to care about them when the coordinate operation is inferred by Apache SIS for a given pair of CRS.

- Longitude rotation (EPSG:9601) — the longitude offset may be specified in any units, but SIS unconditionally converts the value to degrees. Consequently the user is responsible for converting the longitude axis of source and target CRS to degrees before this operation is applied.

Early binding versus late binding implementations
There is sometime multiple ways of transforming coordinates for a given pair of source and target CRS. For example the Bursa-Wolf parameters may vary depending on the area of interest, like in the transformations from NAD27 to WGS84. Even for a fixed set of Bursa-Wolf parameter, there is various ways to use them (Molodensky, Abridged Molodensky, Geocentric translation, etc.).

EPSG identifies two approaches for addressing this multiplicity problem. Quoting the GIGS guideline:

> - Early binding: A priori association of a coordinate transformation with a geodetic CRS. The association is usually made at start-up of the session or project, as that is defined in the software, but always before any data is associated with the ‘CRS’. In general the ‘coordinate transformation’ specified uses the ‘CRS’ of the data as the source ‘CRS’ and WGS 84 as the target ‘CRS’.
> - Late binding: Association at run time of a coordinate transformation with a CRS. Late binding allows the user to select the appropriate transformation upon import of ‘geospatial data’ or merge of two geospatial datasets. This means that, in cases where there are multiple existing transformations, the user can choose the appropriate one, possibly aided by additional information.

> Source: Geospatial Integrity of Geoscience Software Part 1 – GIGS guidelines. OGP publication, Report No. 430-1, September 2011

Apache SIS is a late binding implementation, while a little trace for early binding exists in the form of the `DefaultGeodeticDatum​.getBursaWolfParameters()` method for those who really need it. This means that when searching for a coordinate operation between a given pair of CRS, Apache SIS will query `EPSGFactory` before to try to infer the operation path by itelf. The `CoordinateOperationContext` can be used for further refinements, for example by specifying the area of interest.

Since:
  0.6

Defined in the `sis-referencing` module

- Class Summary
  Class | Description
  --- | ---
  AbstractCoordinateOperation | Describes the operation for transforming coordinates in the source CRS to coordinates in the target CRS.
  CoordinateOperationContext | Optional information about the context in which a requested coordinate operation will be used.
  CoordinateOperationFinder | Finds a conversion or transformation path from a source CRS to a target CRS.
  DefaultConversion | A parameterized mathematical operation that converts coordinates to another CRS without any change of datum.
  DefaultCoordinateOperationFactory | Creates operations capable to transform coordinates from a given source CRS to a given target CRS.
  DefaultFormula | Specification of the coordinate operation method formula.
  DefaultOperationMethod | Describes the algorithm and parameters used to perform a coordinate operation.
  DefaultPassThroughOperation | Specifies that a subset of a coordinate tuple is subject to a specific coordinate operation.
  DefaultTransformation | A parameterized mathematical operation that transforms coordinates to another CRS with a change of datum.

- Exception Summary
  Exception | Description
  --- | ---
  MismatchedDatumException | Thrown when the source and target CRS of a conversion use different datum.