Struct GeographicCoordinate
A two-dimensional geographic position represented by strong geodetic latitude and longitude values.
struct GeographicCoordinate(T)
if (isGeodesyScalar!T);
This value does not carry datum, CRS, axis-order, ellipsoid, or height
semantics. The contained angular types enforce their own finite domains.
represents latitude zero and longitude zero.
Construction and access perform no allocation.
Properties
| Name | Type | Description |
|---|---|---|
latitude[get]
|
Latitude!T | Geodetic latitude. |
longitude[get]
|
Longitude!T | Geodetic longitude. |
Methods
| Name | Description |
|---|---|
fromComponents
(latitude, longitude)
|
Construct from strong latitude and longitude values. |
Example
Example constructing a geographic coordinate.
import geodesy;
const vienna = GeographicCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20849),
Longitude!double .fromDegrees(16.37208));
assert(vienna .latitude .degrees > 48.0);
assert(vienna .longitude .degrees > 16.0);