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);
static void do_test_lwgeom_effectivearea(POINTARRAY *pa, double *the_areas, int avoid_collaps)
static void do_test_lwgeom_effectivearea_polys(void)
static void do_test_lwgeom_effectivearea_lines(void)
void effectivearea_suite_setup(void)
EFFECTIVE_AREAS * initiate_effectivearea(const POINTARRAY *inpts)
void destroy_effectivearea(EFFECTIVE_AREAS *ea)
void ptarray_calc_areas(EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld)
We calculate the effective area for the first time.
#define PG_ADD_TEST(suite, testfunc)
#define LW_PARSER_CHECK_NONE
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
void lwpoly_free(LWPOLY *poly)
void lwline_free(LWLINE *line)
Structure to hold pointarray and its arealist.