Function PseudoMercator.tryFromParameters
Prepare a bounded Pseudo-Mercator operation without throwing.
static bool tryFromParameters(
const Ellipsoid!T ellipsoid,
const Longitude!T longitudeOfNaturalOrigin,
const T falseEasting,
const T falseNorthing,
out PseudoMercator result
) pure nothrow @nogc @safe;
Flattening is retained as source-ellipsoid identity but does not enter EPSG method 1024 coordinate equations. Linear offsets use the same unit as the ellipsoid semi-major axis.
Parameters
| Name | Description |
|---|---|
| ellipsoid | Valid ellipsoid supplying the positive finite semi-major axis. |
| longitudeOfNaturalOrigin | Natural-origin longitude. |
| falseEasting | Finite false easting in the ellipsoid linear unit. |
| falseNorthing | Finite false northing in the ellipsoid linear unit. |
| result | Receives the prepared operation on success. |
Returns
true when all parameters and derived represented bounds are valid;
otherwise false. On failure result is initialized to on entry and has no guaranteed value on failure.
Example
Example preparing Pseudo-Mercator without throwing.
import geodesy;
PseudoMercator!double projection;
assert(PseudoMercator!double .tryFromParameters(
wgs84!double(),
Longitude!double .fromDegrees(0.0),
0.0,
0.0,
projection));
assert(projection .isValid);