PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ initiate_effectivearea()

EFFECTIVE_AREAS* initiate_effectivearea ( const POINTARRAY inpts)

Definition at line 16 of file effectivearea.c.

References EFFECTIVE_AREAS::initial_arealist, EFFECTIVE_AREAS::inpts, lwalloc(), LWDEBUG, POINTARRAY::npoints, and EFFECTIVE_AREAS::res_arealist.

Referenced by do_test_lwgeom_effectivearea(), and ptarray_set_effective_area().

17 {
18  LWDEBUG(2, "Entered initiate_effectivearea");
20  ea=lwalloc(sizeof(EFFECTIVE_AREAS));
21  ea->initial_arealist = lwalloc(inpts->npoints*sizeof(areanode));
22  ea->res_arealist = lwalloc(inpts->npoints*sizeof(double));
23  ea->inpts=inpts;
24  return ea;
25 }
This structure is placed in an array with one member per point.
Definition: effectivearea.h:24
Structure to hold pointarray and it's arealist.
Definition: effectivearea.h:50
int npoints
Definition: liblwgeom.h:355
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:50
const POINTARRAY * inpts
Definition: effectivearea.h:52
double * res_arealist
Definition: effectivearea.h:54
void * lwalloc(size_t size)
Definition: lwutil.c:199
areanode * initial_arealist
Definition: effectivearea.h:53
Here is the call graph for this function:
Here is the caller graph for this function: