Function LambertConformalConic.tryFromTwoStandardParallels
Set up a two-standard-parallel conic map without throwing.
static bool tryFromTwoStandardParallels(
const Ellipsoid!T ellipsoid,
const Latitude!T latitudeOfFalseOrigin,
const Longitude!T longitudeOfFalseOrigin,
const Latitude!T firstStandardParallel,
const Latitude!T secondStandardParallel,
const T falseEasting,
const T falseNorthing,
out LambertConformalConic result
) pure nothrow @nogc @safe;
Use the parameters from the coordinate system you want to reproduce:
ellipsoid, latitude and longitude of false origin, the two standard
parallels, and false easting/northing. The parallels control the map's
scale; they must be distinct and neither may be a pole. The offsets
use the ellipsoid's linear unit. Returns false for unsupported
parameters instead of raising an exception.
Example
Example preparing Austria Lambert parameters without throwing.
import geodesy;
LambertConformalConic!double projection;
assert(LambertConformalConic!double .tryFromTwoStandardParallels(
Ellipsoid!double .fromInverseFlattening(
6_377_397.155,
299.1528128),
Latitude!double .fromDegrees(47.5),
Longitude!double .fromDegrees(13.3333333333333),
Latitude!double .fromDegrees(49.0),
Latitude!double .fromDegrees(46.0),
400_000.0,
400_000.0,
projection));