Struct UpsCoordinate

Tagged UPS coordinate carrying the polar aspect required for reverse use.

struct UpsCoordinate(T)
  
if (isGeodesyScalar!T);

Easting and northing are metres. The represented coordinate rectangle is:

Properties

NameTypeDescription
easting[get] TEasting in metres.
hemisphere[get] UpsHemisphereUPS polar aspect.
isValid[get] boolTrue when this tagged coordinate satisfies the UPS representation policy.
northing[get] TNorthing in metres.
projected[get] ProjectedCoordinate!TUntagged projected coordinate in metres.

Methods

NameDescription
fromComponents (hemisphere, easting, northing) Construct a tagged UPS coordinate or throw.
tryFromComponents (hemisphere, easting, northing, result) Construct a tagged UPS coordinate without throwing.

north

[1200000, 2800000] on each axis

south

[ 700000, 3300000] on each axis

.init is invalid.

Example

Example using a tagged UPS coordinate.

import geodesy;
const coordinate = UpsCoordinate!double.fromComponents(
    UpsHemisphere.north,
    2_100_000.0,
    1_900_000.0);
assert(coordinate.isValid);
assert(coordinate.hemisphere == UpsHemisphere.north);