Function TransverseMercator.reverse

Reverse a projected coordinate.

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

Parameters

NameDescription
source Projected easting and northing in the ellipsoid linear unit.

Returns

The corresponding geographic coordinate.

Throws

GeodesyValueException when the projection is invalid or the coordinate lies outside the supported represented sheet/domain.

Example

Example reversing a Transverse Mercator coordinate.

import geodesy;
const projection = TransverseMercator!double.fromParameters(
    wgs84!double(),
    Latitude!double.fromDegrees(0.0),
    Longitude!double.fromDegrees(15.0),
    0.9996,
    500_000.0,
    0.0);
const source = GeographicCoordinate!double.fromComponents(
    Latitude!double.fromDegrees(48.20849),
    Longitude!double.fromDegrees(16.37208));
const recovered = projection.reverse(projection.forward(source));
assert(recovered.longitude.degrees > 16.0);
}