We calculate the effective area for the first time.
Definition at line 349 of file effectivearea.c.
References areanode::area, area(), POINTARRAY::flags, FLAGS_GET_Z, getPoint_internal(), EFFECTIVE_AREAS::initial_arealist, EFFECTIVE_AREAS::inpts, LWDEBUG, LWDEBUGF, areanode::next, POINTARRAY::npoints, areanode::prev, EFFECTIVE_AREAS::res_arealist, return(), triarea2d(), triarea3d(), and tune_areas().
Referenced by do_test_lwgeom_effectivearea(), and ptarray_set_effective_area().
351 LWDEBUG(2,
"Entered ptarray_calc_areas");
371 for (i=1;i<(npoints)-1;i++)
391 for (i=1;i<(npoints)-1;i++)
396 tune_areas(ea,avoid_collaps,set_area, trshld);
static double triarea3d(const double *P1, const double *P2, const double *P3)
Calculate the area of a triangle in 3d space.
Datum area(PG_FUNCTION_ARGS)
#define LWDEBUG(level, msg)
static double triarea2d(const double *P1, const double *P2, const double *P3)
Calculate the area of a triangle in 2d.
uint8_t * getPoint_internal(const POINTARRAY *pa, int n)
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
static void tune_areas(EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld)
To get the effective area, we have to check what area a point results in when all smaller areas are e...
#define LWDEBUGF(level, msg,...)
areanode * initial_arealist