Function UtmProjection.tryReverseFactors
Evaluate conformal factors at a represented projected coordinate.
bool tryReverseFactors(
const ProjectedCoordinate!T source,
out ConformalProjectionFactors!T result
) const pure nothrow @nogc @safe;
Parameters
| Name | Description |
|---|---|
| source | Projected easting and northing in metres. |
| result | Receives meridian convergence and point scale on success. |
Returns
true when this projection is valid and delegated reverse-factor
evaluation succeeds; otherwise false. On failure result is
reset to ConformalProjectionFactors!T.
Example
Example computing UTM reverse factors 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));
const projected = projection .forward(vienna);
ConformalProjectionFactors!double factors;
assert(projection .tryReverseFactors(projected, factors));
assert(factors .pointScale > 0.0);