PostGIS  2.2.7dev-r@@SVN_REVISION@@
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  int i;
27  EFFECTIVE_AREAS *ea;
28 
29  ea=initiate_effectivearea(pa);
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:28
Structure to hold pointarray and it's arealist.
Definition: effectivearea.h:50
int npoints
Definition: liblwgeom.h:355
void ptarray_calc_areas(EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld)
We calculate the effective area for the first time.
EFFECTIVE_AREAS * initiate_effectivearea(const POINTARRAY *inpts)
Definition: effectivearea.c:16
double * res_arealist
Definition: effectivearea.h:54

Here is the call graph for this function:

Here is the caller graph for this function: