Struct UtmCoordinate
Projected UTM coordinate carrying zone and north/south false-northing convention for unambiguous reverse projection.
struct UtmCoordinate(T)
if (isGeodesyScalar!T);
Easting and northing are always metres. The value carries no datum, CRS
identifier, EPSG code, MGRS latitude band, height, or axis metadata.
is invalid because its zone is invalid.
Properties
| Name | Type | Description |
|---|---|---|
easting[get]
|
T | Easting in metres. |
hemisphere[get]
|
UtmHemisphere | North/south false-northing convention. |
isValid[get]
|
bool | True when the coordinate is structurally valid. |
northing[get]
|
T | Northing in metres. |
projected[get]
|
ProjectedCoordinate!T | Untagged projected coordinate in metres. |
zone[get]
|
UtmZone | UTM zone. |
Methods
| Name | Description |
|---|---|
fromComponents
(zone, hemisphere, easting, northing)
|
Construct a tagged UTM coordinate. |
tryFromComponents
(zone, hemisphere, easting, northing, result)
|
Construct a tagged UTM coordinate without throwing. |
Example
Example using struct UtmCoordinate(T) if (isGeodesyScalar!T).
import geodesy;
const coordinate = UtmCoordinate!double .fromComponents(
UtmZone .fromNumber(33),
UtmHemisphere .north,
500_000.0,
5_340_000.0);
assert(coordinate .isValid);
assert(coordinate .zone .number == 33);
assert(coordinate .easting == 500_000.0);