Function UtmCoordinate.fromComponents

Construct a tagged UTM coordinate.

static UtmCoordinate fromComponents(
  const UtmZone zone,
  const UtmHemisphere hemisphere,
  const T easting,
  const T northing
) @safe;

Parameters

NameDescription
zone Valid UTM zone.
hemisphere North/south false-northing convention.
easting Finite easting in metres.
northing Finite northing in metres.

Returns

The tagged UTM coordinate.

Throws

GeodesyValueException for an invalid zone or hemisphere, or non-finite easting/northing.

Example

Example constructing a tagged UTM coordinate.

import geodesy;
const coordinate = UtmCoordinate!double.fromComponents(
    UtmZone.fromNumber(33), UtmHemisphere.north,
    500_000.0, 5_340_000.0);
assert(coordinate.easting == 500_000.0);