Struct GeocentricTranslation
Translation parameters from a source geocentric frame to a target geocentric frame using EPSG method 1031.
struct GeocentricTranslation(T)
if (isGeodesyScalar!T);
All three translations use the same linear unit as source and target
geocentric coordinates. The represented direction is source to target:
target components equal source components plus the corresponding
translation. is therefore the identity transformation.
inverse returns the exact inverse parameterization by negating all three
translations. Construction rejects non-finite parameters.
Properties
| Name | Type | Description |
|---|---|---|
deltaX[get]
|
T | X-axis translation in the coordinate linear unit. |
deltaY[get]
|
T | Y-axis translation in the coordinate linear unit. |
deltaZ[get]
|
T | Z-axis translation in the coordinate linear unit. |
Methods
| Name | Description |
|---|---|
fromComponents
(deltaX, deltaY, deltaZ)
|
Construct source-to-target translation parameters. |
inverse
()
|
Return the exact inverse parameterization. |
tryFromComponents
(deltaX, deltaY, deltaZ, result)
|
Construct source-to-target translation parameters without throwing. |
Example
Example using struct GeocentricTranslation(T) if (isGeodesyScalar!T).
import geodesy;
const shift = GeocentricTranslation!double .fromComponents(
84.87, 96.49, 116.95);
const source = GeocentricCoordinate!double .fromComponents(
3_771_793.97, 140_253.34, 5_124_304.35);
const target = source .applyGeocentricTranslation(shift);
const recovered = target .applyGeocentricTranslation(shift .inverse);
assert(target .x > source .x);
assert(recovered == source);