Function EqualEarth.tryReverse

Invert a point in the represented Equal Earth footprint.

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

Example

Example

invert an Equal Earth coordinate without throwing.

import geodesy.ellipsoid : wgs84;
auto projection = EqualEarth!double.fromParameters(
    wgs84!double(), Longitude!double.fromDegrees(0), 0.0, 0.0);
GeographicCoordinate!double result;
assert(projection.tryReverse(
    ProjectedCoordinate!double.fromComponents(0.0, 0.0), result));
assert(result.latitude.degrees == 0.0);