PostGIS  2.4.9dev-r@@SVN_REVISION@@
effectivearea.c File Reference
#include "effectivearea.h"
Include dependency graph for effectivearea.c:

Go to the source code of this file.

Functions

EFFECTIVE_AREASinitiate_effectivearea (const POINTARRAY *inpts)
 
void destroy_effectivearea (EFFECTIVE_AREAS *ea)
 
static MINHEAP initiate_minheap (int npoints)
 
static void destroy_minheap (MINHEAP tree)
 
static double triarea2d (const double *P1, const double *P2, const double *P3)
 Calculate the area of a triangle in 2d. More...
 
static double triarea3d (const double *P1, const double *P2, const double *P3)
 Calculate the area of a triangle in 3d space. More...
 
static int cmpfunc (const void *a, const void *b)
 We create the minheap by ordering the minheap array by the areas in the areanode structs that the minheap keys refere to. More...
 
static void down (MINHEAP *tree, areanode *arealist, int parent)
 Sift Down. More...
 
static void up (MINHEAP *tree, areanode *arealist, int c)
 Sift Up. More...
 
static areanodeminheap_pop (MINHEAP *tree, areanode *arealist)
 Get a reference to the point with the smallest effective area from the root of the min heap. More...
 
static void minheap_update (MINHEAP *tree, areanode *arealist, int idx)
 The member of the minheap at index idx is changed. More...
 
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 eliminated. More...
 
void ptarray_calc_areas (EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld)
 We calculate the effective area for the first time. More...
 
static POINTARRAYptarray_set_effective_area (POINTARRAY *inpts, int avoid_collaps, int set_area, double trshld)
 
static LWLINElwline_set_effective_area (const LWLINE *iline, int set_area, double trshld)
 
static LWPOLYlwpoly_set_effective_area (const LWPOLY *ipoly, int set_area, double trshld)
 
static LWCOLLECTIONlwcollection_set_effective_area (const LWCOLLECTION *igeom, int set_area, double trshld)
 
LWGEOMlwgeom_set_effective_area (const LWGEOM *igeom, int set_area, double trshld)