PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ initiate_effectivearea()

EFFECTIVE_AREAS* initiate_effectivearea ( const POINTARRAY inpts)

Definition at line 30 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().

31 {
32  LWDEBUG(2, "Entered initiate_effectivearea");
33  EFFECTIVE_AREAS *ea;
34  ea=lwalloc(sizeof(EFFECTIVE_AREAS));
35  ea->initial_arealist = lwalloc(inpts->npoints*sizeof(areanode));
36  ea->res_arealist = lwalloc(inpts->npoints*sizeof(double));
37  ea->inpts=inpts;
38  return ea;
39 }
This structure is placed in an array with one member per point.
Definition: effectivearea.h:38
Structure to hold pointarray and it's arealist.
Definition: effectivearea.h:64
int npoints
Definition: liblwgeom.h:370
#define LWDEBUG(level, msg)
Definition: lwgeom_log.h:83
const POINTARRAY * inpts
Definition: effectivearea.h:66
double * res_arealist
Definition: effectivearea.h:68
void * lwalloc(size_t size)
Definition: lwutil.c:227
areanode * initial_arealist
Definition: effectivearea.h:67
Here is the call graph for this function:
Here is the caller graph for this function: