Function GeodesicIntersectionSolver.tryFromGeodesic

Prepare reusable invariant state for the oriented-intersection family.

static bool tryFromGeodesic(
  const Geodesic!T solver,
  out GeodesicIntersectionSolver result
) pure nothrow @nogc @safe;

Closest and next-intersection searches share the same geodesic solver and authalic scale. Their ellipsoid-dependent seed spacings are derived once here and reused by every prepared operation.

Example

Example preparing reusable intersection-family state.

const solver = Geodesic!double.fromEllipsoid(wgs84!double());
GeodesicIntersectionSolver!double prepared;

assert(GeodesicIntersectionSolver!double.tryFromGeodesic(
    solver, prepared));
assert(prepared.isValid);