Struct GeodeticCoordinate
A geodetic position represented by strong latitude and longitude values and finite ellipsoidal height.
struct GeodeticCoordinate(T)
if (isGeodesyScalar!T);
The linear unit of ellipsoidalHeight is not encoded in the type. When
used with an ellipsoid, the height and ellipsoid axes must use the same
linear unit. No datum, CRS, or ellipsoid identity is embedded.
represents latitude zero, longitude zero, and zero ellipsoidal
height. Checked construction returns false for non-finite height;
throwing construction reports the same failure with
GeodesyValueException.
Properties
| Name | Type | Description |
|---|---|---|
ellipsoidalHeight[get]
|
T | Ellipsoidal height in the operation's linear unit. |
latitude[get]
|
Latitude!T | Geodetic latitude. |
longitude[get]
|
Longitude!T | Geodetic longitude. |
Methods
| Name | Description |
|---|---|
fromComponents
(latitude, longitude, ellipsoidalHeight)
|
Construct a geodetic coordinate. |
tryFromComponents
(latitude, longitude, ellipsoidalHeight, result)
|
Construct from strong angular values and finite ellipsoidal height without throwing. |
Example
Example constructing and validating a geodetic coordinate.
import geodesy;
const vienna = GeodeticCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20849),
Longitude!double .fromDegrees(16.37208),
171.0);
assert(vienna .ellipsoidalHeight == 171.0);
GeodeticCoordinate!double checked;
assert(!GeodeticCoordinate!double .tryFromComponents(
vienna .latitude, vienna .longitude, double .nan, checked));