PostGIS  2.2.7dev-r@@SVN_REVISION@@
effectivearea.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * PostGIS - Spatial Types for PostgreSQL
4  * http://postgis.net
5  * Copyright 2014 Nicklas Avén
6  *
7  * This is free software; you can redistribute and/or modify it under
8  * the terms of the GNU General Public Licence. See the COPYING file.
9  *
10  **********************************************************************/
11  #ifndef _EFFECTIVEAREA_H
12 #define _EFFECTIVEAREA_H 1
13 
14 
15  #include "liblwgeom_internal.h"
16  #include "lwgeom_log.h"
17 
18 
24 typedef struct
25 {
26  double area;
27  int treeindex;
28  int prev;
29  int next;
30 } areanode;
31 
32 
38 typedef struct
39 {
40  int maxSize;
41  int usedSize;
43 } MINHEAP;
44 
45 
50 typedef struct
51 {
52  const POINTARRAY *inpts;
54  double *res_arealist;
56 
57 
59 
61 
62 void ptarray_calc_areas(EFFECTIVE_AREAS *ea,int avoid_collaps, int set_area, double trshld);
63 
64 #endif /* _EFFECTIVEAREA_H */
void destroy_effectivearea(EFFECTIVE_AREAS *ea)
Definition: effectivearea.c:28
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
This structure holds a minheap tree that is used to keep track of what points that has the smallest e...
Definition: effectivearea.h:38
double area
Definition: effectivearea.h:26
int maxSize
Definition: effectivearea.h:40
void ptarray_calc_areas(EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld)
We calculate the effective area for the first time.
const POINTARRAY * inpts
Definition: effectivearea.h:52
EFFECTIVE_AREAS * initiate_effectivearea(const POINTARRAY *inpts)
Definition: effectivearea.c:16
double * res_arealist
Definition: effectivearea.h:54
int usedSize
Definition: effectivearea.h:41
int treeindex
Definition: effectivearea.h:27
areanode ** key_array
Definition: effectivearea.h:42
areanode * initial_arealist
Definition: effectivearea.h:53