Function PolarStereographic.tryForward

Project a geographic coordinate without throwing.

bool tryForward(
  const GeographicCoordinate!T source,
  out ProjectedCoordinate!T result
) const pure nothrow @nogc @safe;

Example

Example checking a Polar Stereographic forward projection.

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);
ProjectedCoordinate!double result;
assert(projection.tryForward(
    GeographicCoordinate!double.fromComponents(
        Latitude!double.fromDegrees(73.0),
        Longitude!double.fromDegrees(44.0)), result));
assert(result.easting > 3_000_000.0);