From a2efc211eb5fa79ce3c6e666e83c3e65afd22e46 Mon Sep 17 00:00:00 2001 From: Charles Karney Date: Sun, 22 Sep 2019 16:44:57 -0400 Subject: Update to version 1.50 of the geodesic library. * Allow arbitrarily complex polygons in geod_polygon_*. In the case of self-intersecting polygons the area is accumulated "algebraically", e.g., the areas of the 2 loops in a figure-8 polygon will partially cancel. * Simplify code by using C99 functions remainder and remquo. * More test coverage. Fixes to associated files: * src/pipeline.cpp invoke geod_init with f = es / (1 + sqrt(1 - es)) instead of (the less accurate) f = 1 - sqrt(1 - es) * src/apps/geod_set.cpp remove "#undef f" (a dangling relic?). --- src/pipeline.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/pipeline.cpp') diff --git a/src/pipeline.cpp b/src/pipeline.cpp index afa3b19a..a82fce31 100644 --- a/src/pipeline.cpp +++ b/src/pipeline.cpp @@ -330,7 +330,7 @@ static void set_ellipsoid(PJ *P) { pj_calc_ellipsoid_params (P, P->a, P->es); - geod_init(P->geod, P->a, (1 - sqrt (1 - P->es))); + geod_init(P->geod, P->a, P->es / (1 + sqrt(P->one_es))); /* Re-attach the dangling list */ /* Note: cur will always be non 0 given argv_sentinel presence, */ -- cgit v1.2.3