PostGIS
2.5.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
*
6
* PostGIS is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 2 of the License, or
9
* (at your option) any later version.
10
*
11
* PostGIS is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with PostGIS. If not, see <http://www.gnu.org/licenses/>.
18
*
19
**********************************************************************
20
*
21
* Copyright 2014 Nicklas Avén
22
*
23
**********************************************************************/
24
25
#ifndef _EFFECTIVEAREA_H
26
#define _EFFECTIVEAREA_H 1
27
28
29
#include "
liblwgeom_internal.h
"
30
#include "
lwgeom_log.h
"
31
32
38
typedef
struct
39
{
40
double
area
;
41
int
treeindex
;
42
int
prev
;
43
int
next
;
44
}
areanode
;
45
46
52
typedef
struct
53
{
54
int
maxSize
;
55
int
usedSize
;
56
areanode
**
key_array
;
57
}
MINHEAP
;
58
59
64
typedef
struct
65
{
66
const
POINTARRAY
*
inpts
;
67
areanode
*
initial_arealist
;
68
double
*
res_arealist
;
69
}
EFFECTIVE_AREAS
;
70
71
72
EFFECTIVE_AREAS
*
initiate_effectivearea
(
const
POINTARRAY
*inpts);
73
74
void
destroy_effectivearea
(
EFFECTIVE_AREAS
*ea);
75
76
void
ptarray_calc_areas
(
EFFECTIVE_AREAS
*ea,
int
avoid_collaps,
int
set_area,
double
trshld);
77
78
#endif
/* _EFFECTIVEAREA_H */
initiate_effectivearea
EFFECTIVE_AREAS * initiate_effectivearea(const POINTARRAY *inpts)
Definition:
effectivearea.c:30
destroy_effectivearea
void destroy_effectivearea(EFFECTIVE_AREAS *ea)
Definition:
effectivearea.c:42
ptarray_calc_areas
void ptarray_calc_areas(EFFECTIVE_AREAS *ea, int avoid_collaps, int set_area, double trshld)
We calculate the effective area for the first time.
Definition:
effectivearea.c:349
liblwgeom_internal.h
lwgeom_log.h
EFFECTIVE_AREAS::initial_arealist
areanode * initial_arealist
Definition:
effectivearea.h:67
EFFECTIVE_AREAS::res_arealist
double * res_arealist
Definition:
effectivearea.h:68
EFFECTIVE_AREAS::inpts
const POINTARRAY * inpts
Definition:
effectivearea.h:66
EFFECTIVE_AREAS
Structure to hold pointarray and its arealist.
Definition:
effectivearea.h:65
MINHEAP::maxSize
int maxSize
Definition:
effectivearea.h:54
MINHEAP::key_array
areanode ** key_array
Definition:
effectivearea.h:56
MINHEAP::usedSize
int usedSize
Definition:
effectivearea.h:55
MINHEAP
This structure holds a minheap tree that is used to keep track of what points that has the smallest e...
Definition:
effectivearea.h:53
POINTARRAY
Definition:
liblwgeom.h:367
areanode::prev
int prev
Definition:
effectivearea.h:42
areanode::treeindex
int treeindex
Definition:
effectivearea.h:41
areanode::next
int next
Definition:
effectivearea.h:43
areanode::area
double area
Definition:
effectivearea.h:40
areanode
This structure is placed in an array with one member per point.
Definition:
effectivearea.h:39
liblwgeom
effectivearea.h
Generated by
1.9.1