Function TopocentricFrame.geodeticToTopocentric
Convert a geodetic coordinate directly to local East/North/Up.
Throws GeodesyValueException when the frame is invalid or the
composed EPSG 9837 operation cannot produce a finite representable
public result.
Parameters
| Name | Description |
|---|---|
| source | Geodetic coordinate whose height uses the frame linear unit. |
Returns
Local East/North/Up in the frame linear unit.
Throws
GeodesyValueException for an invalid frame or failed composed conversion.
Example
Example converting a geodetic position to ENU.
import geodesy;
const origin = GeodeticCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20849),
Longitude!double .fromDegrees(16.37208),
171.0);
const frame = TopocentricFrame!double .fromGeodeticOrigin(
wgs84!double(), origin);
const nearby = GeodeticCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20850),
Longitude!double .fromDegrees(16.37210),
175.0);
const local = frame .geodeticToTopocentric(nearby);
assert(local .north == local .north);