1354 lwg =
lwgeom_from_wkt(
"POLYGON((-122.848227067007 42.5007249610493,-122.848309475585 42.5007179884263,-122.848327688675 42.500835880696,-122.848245279942 42.5008428533324,-122.848227067007 42.5007249610493))",
LW_PARSER_CHECK_NONE);
1360 CU_ASSERT_DOUBLE_EQUAL(a1, 89.721147136698008, 0.1);
1365 CU_ASSERT_DOUBLE_EQUAL(a2, 89.868413479309585, 0.1);
1373 CU_ASSERT_DOUBLE_EQUAL(a1, 12341436880.106982993974659, 0.1);
1378 CU_ASSERT_DOUBLE_EQUAL(a2, 12286884908.946891319597874, 0.1);
1387 CU_ASSERT_DOUBLE_EQUAL(a1, 12360265021.368023059138681, 0.1);
1391 CU_ASSERT_DOUBLE_EQUAL(a2, 12305128751.042900673161556, 0.1);
1400 CU_ASSERT_DOUBLE_EQUAL(a1, 12360265021.368023059138681, 0.1);
1404 CU_ASSERT_DOUBLE_EQUAL(a2, 12305128751.042900673161556, 0.1);
1413 CU_ASSERT_DOUBLE_EQUAL(a1, 12360265021.368023059138681, 0.1);
1417 CU_ASSERT_DOUBLE_EQUAL(a2, 12305128751.042900673161556, 0.1);
int lwgeom_calculate_gbox_geodetic(const LWGEOM *geom, GBOX *gbox)
Calculate the geodetic bounding box for an LWGEOM.
void spheroid_init(SPHEROID *s, double a, double b)
Initialize a spheroid object for use in geodetic functions.
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
#define LW_PARSER_CHECK_NONE
double lwgeom_area_sphere(const LWGEOM *lwgeom, const SPHEROID *spheroid)
Calculate the geodetic area of a lwgeom on the sphere.
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
double lwgeom_area_spheroid(const LWGEOM *lwgeom, const SPHEROID *spheroid)
Calculate the geodetic area of a lwgeom on the spheroid.