Class DatumShiftTransform

All Implemented Interfaces:
`Serializable`, `Parameterized`, `Lenient­Comparable`, `Math­Transform`
Direct Known Subclasses:
`Interpolated­Geocentric­Transform`, `Interpolated­Molodensky­Transform`, `Interpolated­Transform`, `Molodensky­Transform`

public abstract class DatumShiftTransform extends AbstractMathTransform implements Serializable
Transforms between two CRS (usually geographic) based on different datum. A datum shift may be needed when two CRS use different ellipsoids as approximation of the shape of the Earth. Sometime two CRS use the same ellipsoid but with different anchor point (i.e. their coordinate systems have their origin in different locations).

There is many different datum shift methods, ranging from transformations as simple as adding a constant offset to geographic coordinates, to more complex transformations involving conversions to geocentric coordinates and/or interpolations in a datum shift grid. The simple cases like adding a constant offset are handled by other `Math­Transform` implementations like `Linear­Transform`. More complex methods are subclasses of this `Datum­Shift­Transform` base class, but users should not assume that this is the case of every transforms performing a datum shift.

Datum shift methods overview

The two CRS's ellipsoids have slightly different scale and rotation in space, and their center are located in a slightly different position. Consequently geodetic datum shifts are often approximated by a constant scale, rotation and translation applied on geocentric coordinates. Those approximations are handled in SIS by concatenations of `Ellipsoid­To­Centric­Transform` with `Linear­Transform` instead of a specific `Datum­Shift­Transform` subclass.

If the geodetic datum shifts is approximated only by a geocentric translation without any scale or rotation, and if an error of a few centimetres it acceptable, then the `Molodensky­Transform` subclass can be used as an approximation of the above method. The Molodensky method requires less floating point operations since it applies directly on geographic coordinates, without conversions to geocentric coordinates.

Some countries go one step further and allow the above geocentric translations to be non-constant. Instead, a different geocentric translation is interpolated for each geographic input coordinates. This case is handled by the `Interpolated­Geocentric­Transform` subclass, or its `Interpolated­Molodensky­Transform` variant if a few centimetres accuracy lost can be afforded.

A simpler alternative to the above is to interpolate translations to apply directly on geographic coordinates. This is the approach taken by NADCON and NTv2 grids. SIS handles those datum shifts with the `Interpolated­Transform` subclass.

Since:
0.7

Defined in the `sis-referencing` module

Nested classes/interfaces inherited from class AbstractMathTransform

`Abstract­Math­Transform​.Inverse`
• Method Summary

Modifier and Type
Method
Description
`protected int`
`compute­Hash­Code()`
Computes a hash value for this transform.
`boolean`
```equals(Object object, Comparison­Mode mode)```
Compares the specified object with this math transform for equality.
`protected Contextual­Parameters`
`get­Contextual­Parameters()`
Returns the parameters used for creating the complete transformation.
`Parameter­Value­Group`
`get­Parameter­Values()`
Returns the internal parameter values of this `Datum­Shift­Transform` instance (ignoring context).

Methods inherited from class AbstractMathTransform

`derivative, equals, format­To, get­Parameter­Descriptors, get­Source­Dimensions, get­Target­Dimensions, hash­Code, inverse, is­Identity, transform, transform, transform, transform, transform, transform, try­Concatenate`

Methods inherited from class FormattableObject

`print, to­String, to­String, to­WKT`

Methods inherited from class Object

`clone, finalize, get­Class, notify, notify­All, wait, wait, wait`

Methods inherited from interface MathTransform

`to­WKT`
• Method Details

• getParameterValues

public ParameterValueGroup getParameterValues()
Returns the internal parameter values of this `Datum­Shift­Transform` instance (ignoring context). The parameters returned by this method do not necessarily describe the whole datum shift process, because `Datum­Shift­Transform` instances are often preceeded and followed by linear conversions. It may be conversions between degrees and radians units, or conversions from geodetic coordinates to grid indices.
Example: The chain of transforms of an `Interpolated­Geocentric­Transform` is:
$MathML capable browser required$
1. Geographic to geocentric conversion
2. Geocentric interpolation
3. Geocentric to geographic conversion
$MathML capable browser required$
This method returns the parameters for the part in the middle of above example. The content of this part is highly implementation-dependent and used mostly for debugging purposes. The parameters that describe the process as a whole are rather given by `get­Contextual­Parameters()`.
Specified by:
`get­Parameter­Values` in interface `Parameterized`
Overrides:
`get­Parameter­Values` in class `Abstract­Math­Transform`
Returns:
the internal parameter values for this transform.
• getContextualParameters

protected ContextualParameters getContextualParameters()
Returns the parameters used for creating the complete transformation. Those parameters describe a sequence of normalize`this`denormalize transforms, not including axis swapping. Those parameters are used for formatting Well Known Text (WKT) and error messages.
Overrides:
`get­Contextual­Parameters` in class `Abstract­Math­Transform`
Returns:
the parameter values for the sequence of normalize`this`denormalize transforms.
• computeHashCode

protected int computeHashCode()
Computes a hash value for this transform. This method is invoked by `Abstract­Math­Transform​.hash­Code()` when first needed.
Overrides:
`compute­Hash­Code` in class `Abstract­Math­Transform`
Returns:
the hash code value. This value may change between different execution of the Apache SIS library.
• equals

public boolean equals(Object object, ComparisonMode mode)
Compares the specified object with this math transform for equality.
Specified by:
`equals` in interface `Lenient­Comparable`
Overrides:
`equals` in class `Abstract­Math­Transform`
Parameters:
`object` - the object to compare with this transform.
`mode` - the strictness level of the comparison. Default to `STRICT`.
Returns:
`true` if the given object is considered equals to this math transform.