From 3bb6c854c3d8ef34787635e90eb01d33dcb02ebb Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Fri, 12 Oct 2012 19:49:27 +0000 Subject: [PATCH] Reduce precision test to 1cm2. There is no doubt that this approach is less numerically stable than the last. (#2043) Though in exchange, it covers the globe more completely. git-svn-id: http://svn.osgeo.org/postgis/trunk@10424 b70326c6-7e19-0410-871a-916f4a2858ee --- liblwgeom/cunit/cu_geodetic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/liblwgeom/cunit/cu_geodetic.c b/liblwgeom/cunit/cu_geodetic.c index 6b3b57e71..ae41d6b77 100644 --- a/liblwgeom/cunit/cu_geodetic.c +++ b/liblwgeom/cunit/cu_geodetic.c @@ -990,8 +990,8 @@ static void test_spheroid_area(void) a1 = lwgeom_area_sphere(lwg, &s); a2 = lwgeom_area_spheroid(lwg, &s); printf("\nsphere: %.12g\nspheroid: %.12g\n", a1, a2); - CU_ASSERT_DOUBLE_EQUAL(a1, 89.7127703297, 0.001); /* sphere */ - CU_ASSERT_DOUBLE_EQUAL(a2, 89.8684316032, 0.001); /* spheroid */ + CU_ASSERT_DOUBLE_EQUAL(a1, 89.7127703297, 0.1); /* sphere */ + CU_ASSERT_DOUBLE_EQUAL(a2, 89.8684316032, 0.1); /* spheroid */ lwgeom_free(lwg); /* Big-ass polygon */ @@ -1170,7 +1170,7 @@ static void test_lwgeom_area_sphere(void) lwg = lwgeom_from_wkt("POLYGON((1 1, 1 2, 2 2, 2 1, 1 1))", LW_PARSER_CHECK_NONE); area = lwgeom_area_sphere(lwg, &s); - CU_ASSERT_DOUBLE_EQUAL(area, 12360265021.3561, 0.01); + CU_ASSERT_DOUBLE_EQUAL(area, 12360265021.3561, 1.0); lwgeom_free(lwg); return; } -- 2.50.1