Struct ProjectedCoordinate
A canonical projected coordinate represented as finite easting and northing.
struct ProjectedCoordinate(T)
if (isGeodesyScalar!T);
Both components use the same caller-selected linear unit as the projection operation that consumes or produced the value. The type deliberately carries no CRS, axis-order, datum, or unit metadata.
represents (0,0). Checked construction returns false for
non-finite components; throwing construction reports the same failure with
GeodesyValueException.
Properties
| Name | Type | Description |
|---|---|---|
easting[get]
|
T | Easting in the operation's linear unit. |
northing[get]
|
T | Northing in the operation's linear unit. |
Methods
| Name | Description |
|---|---|
fromComponents
(easting, northing)
|
Construct from finite easting and northing. |
tryFromComponents
(easting, northing, result)
|
Construct from finite easting and northing without throwing. |
Example
Example constructing a projected coordinate.
import geodesy;
const p = ProjectedCoordinate!double .fromComponents(
500_000.0, 5_340_000.0);
assert(p .easting == 500_000.0);
assert(p .northing == 5_340_000.0);