Function UtmProjection.tryReverse
Reverse a coordinate in this explicit UTM zone without throwing.
bool tryReverse(
const ProjectedCoordinate!T source,
out GeographicCoordinate!T result
) const pure nothrow @nogc @safe;
The automatic UTM latitude band, zone selection, and hemisphere selection are not reapplied.
Parameters
| Name | Description |
|---|---|
| source | Projected easting and northing in metres. |
| result | Receives the geographic coordinate on success. |
Returns
true when this projection is valid and delegated bounded TM
reverse succeeds; otherwise false. On failure result remains
unchanged.
Example
Example reversing a prepared UTM coordinate without throwing.
import geodesy;
const projection = UtmProjection!double .fromZone(
wgs84!double(), UtmZone .fromNumber(33), UtmHemisphere .north);
const vienna = GeographicCoordinate!double .fromComponents(
Latitude!double .fromDegrees(48.20849),
Longitude!double .fromDegrees(16.37208));
GeographicCoordinate!double result;
assert(projection .tryReverse(projection .forward(vienna), result));
assert(result .latitude .degrees > 48.0);