Function LambertConformalConic.tryForward
Project a geographic coordinate without throwing.
bool tryForward(
const GeographicCoordinate!T source,
out ProjectedCoordinate!T result
) const pure nothrow @nogc @safe;
Example
Example projecting a geographic coordinate without throwing.
import geodesy;
const p = LambertConformalConic!double .fromTwoStandardParallels(
wgs84!double(),
Latitude!double .fromDegrees(40.0),
Longitude!double .fromDegrees(-96.0),
Latitude!double .fromDegrees(33.0),
Latitude!double .fromDegrees(45.0),
0.0, 0.0);
ProjectedCoordinate!double projected;
assert(p .tryForward(
GeographicCoordinate!double .fromComponents(
Latitude!double .fromDegrees(35.0),
Longitude!double .fromDegrees(-75.0)),
projected));