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.

.init represents (0,0). Checked construction returns false for non-finite components; throwing construction reports the same failure with GeodesyValueException.

Properties

NameTypeDescription
easting[get] TEasting in the operation's linear unit.
northing[get] TNorthing in the operation's linear unit.

Methods

NameDescription
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);