16 #include "CUnit/Basic.h" 48 double the_areas1[]={FLT_MAX,0.5,0.5,0,FLT_MAX};
53 double the_areas2[]={FLT_MAX,5,1.5,55,100,4,4,300,FLT_MAX};
66 the_geom = (
LWPOLY*)
lwgeom_from_wkt(
"POLYGON((10 10,12 8, 15 7, 18 7, 20 20, 15 21, 18 22, 10 30,1 99, 0 100, 10 10))",
LW_PARSER_CHECK_NONE);
67 double the_areas1[]={FLT_MAX,5,1.5,55,100,4,4,FLT_MAX,30,FLT_MAX,FLT_MAX};
76 CU_pSuite suite = CU_add_suite(
"effectivearea",NULL,NULL);
void destroy_effectivearea(EFFECTIVE_AREAS *ea)
static void do_test_lwgeom_effectivearea(POINTARRAY *pa, double *the_areas, int avoid_collaps)
static void do_test_lwgeom_effectivearea_polys(void)
Structure to hold pointarray and it's arealist.
void effectivearea_suite_setup(void)
void lwline_free(LWLINE *line)
void ptarray_calc_areas(EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld)
We calculate the effective area for the first time.
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
#define LW_PARSER_CHECK_NONE
EFFECTIVE_AREAS * initiate_effectivearea(const POINTARRAY *inpts)
void lwpoly_free(LWPOLY *poly)
#define PG_ADD_TEST(suite, testfunc)
static void do_test_lwgeom_effectivearea_lines(void)