Function applyGeocentricTranslation

Apply EPSG method 1031 in the source-to-target direction.

GeocentricCoordinate!T applyGeocentricTranslation(T)(
  const GeocentricCoordinate!T source,
  const GeocentricTranslation!T translation
) @safe
if (isGeodesyScalar!T);

Parameters

NameDescription
source Source geocentric coordinate.
translation Source-to-target translation parameters in the same linear unit.

Returns

The target geocentric coordinate.

Throws

GeodesyValueException when finite arithmetic cannot produce a finite representable target.

Example

Example applying a geocentric translation.

import geodesy;
const source = GeocentricCoordinate!double.fromComponents(1.0, 2.0, 3.0);
const shift = GeocentricTranslation!double.fromComponents(4.0, 5.0, 6.0);
const target = applyGeocentricTranslation(source, shift);
assert(target == GeocentricCoordinate!double.fromComponents(5.0, 7.0, 9.0));