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
| Name | Type | Description |
|---|---|---|
easting[get]
|
T | Easting in metres. |
hemisphere[get]
|
UpsHemisphere | UPS polar aspect. |
isValid[get]
|
bool | True when this tagged coordinate satisfies the UPS representation policy. |
northing[get]
|
T | Northing in metres. |
projected[get]
|
ProjectedCoordinate!T | Untagged projected coordinate in metres. |
Methods
| Name | Description |
|---|---|
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
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);