Function EqualEarth.tryForward
Project a geographic coordinate without throwing.
bool tryForward(
const GeographicCoordinate!T source,
out ProjectedCoordinate!T result
) const pure nothrow @nogc @safe;
Example
Example
check the forward projection.
import geodesy .ellipsoid : wgs84;
auto projection = EqualEarth!double .fromParameters(
wgs84!double(), Longitude!double .fromDegrees(0), 0.0, 0.0);
ProjectedCoordinate!double result;
assert(projection .tryForward(
GeographicCoordinate!double .fromComponents(
Latitude!double .fromDegrees(0),
Longitude!double .fromDegrees(0)), result));
assert(result .easting == 0.0);