Function GeodeticCoordinate.fromComponents
Construct a geodetic coordinate.
static GeodeticCoordinate fromComponents(
const Latitude!T latitude,
const Longitude!T longitude,
const T ellipsoidalHeight = 0
) @safe;
Parameters
| Name | Description |
|---|---|
| latitude | Geodetic latitude. |
| longitude | Geodetic longitude. |
| ellipsoidalHeight | Finite height in the caller-selected linear unit. |
Returns
The constructed coordinate.
Throws
GeodesyValueException when ellipsoidalHeight is NaN or infinite.
Example
Example constructing a geodetic coordinate.
import geodesy;
const point = GeodeticCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.0),
Longitude!double .fromDegrees(16.0),
171.0);
assert(point .ellipsoidalHeight == 171.0);