PostGIS  2.5.1dev-r@@SVN_REVISION@@

◆ do_test_lwgeom_effectivearea()

static void do_test_lwgeom_effectivearea ( POINTARRAY pa,
double *  the_areas,
int  avoid_collaps 
)
static

Definition at line 23 of file cu_effectivearea.c.

References destroy_effectivearea(), initiate_effectivearea(), POINTARRAY::npoints, ptarray_calc_areas(), and EFFECTIVE_AREAS::res_arealist.

Referenced by do_test_lwgeom_effectivearea_lines(), and do_test_lwgeom_effectivearea_polys().

24 {
25 
26  uint32_t i;
27  EFFECTIVE_AREAS *ea;
28 
30  ptarray_calc_areas(ea,avoid_collaps,1,0);
31 
32  for (i=0;i<pa->npoints;i++)
33  {
34  CU_ASSERT_EQUAL(ea->res_arealist[i],the_areas[i]);
35  }
36 
38 
39 
40 }
void destroy_effectivearea(EFFECTIVE_AREAS *ea)
Definition: effectivearea.c:42
Structure to hold pointarray and its arealist.
Definition: effectivearea.h:64
void ptarray_calc_areas(EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld)
We calculate the effective area for the first time.
unsigned int uint32_t
Definition: uthash.h:78
EFFECTIVE_AREAS * initiate_effectivearea(const POINTARRAY *inpts)
Definition: effectivearea.c:30
double * res_arealist
Definition: effectivearea.h:68
uint32_t npoints
Definition: liblwgeom.h:373
Here is the call graph for this function:
Here is the caller graph for this function: