Function PolarStereographic.forward

Convert a position near the chosen pole into grid coordinates.

ProjectedCoordinate!T forward(
  const GeographicCoordinate!T source
) const @safe;

Returns easting and northing in the ellipsoid's linear unit. Use tryForward when invalid input should return false instead.

Example

Example projecting a geographic point with the throwing convenience API.

import geodesy;
const projection = PolarStereographic!double.fromParameters(
    wgs84!double(), Latitude!double.fromDegrees(90.0),
    Longitude!double.fromDegrees(0.0), 0.994,
    2_000_000.0, 2_000_000.0);
const result = projection.forward(
    GeographicCoordinate!double.fromComponents(
        Latitude!double.fromDegrees(73.0),
        Longitude!double.fromDegrees(44.0)));
assert(result.northing < 2_000_000.0);