PostGIS  2.3.7dev-r@@SVN_REVISION@@
lwgeom_rtree.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^
22  *
23  **********************************************************************/
24 
25 #ifndef _LWGEOM_RTREE_H
26 #define _LWGEOM_RTREE_H 1
27 
28 #include "liblwgeom.h"
29 
33 typedef struct
34 {
35  double min;
36  double max;
37 }
39 
45 typedef struct rtree_node
46 {
51 }
53 
57 typedef struct
58 {
60  int* ringCounts;
61  int polyCount;
62 }
64 
65 
66 
67 typedef struct {
68  int type; // <GeomCache>
71  size_t geom1_size; //
72  size_t geom2_size; //
73  int32 argnum; // </GeomCache>
76 
77 
82 
83 
89 RTREE_POLY_CACHE* GetRtreeCache(FunctionCallInfoData* fcinfo, GSERIALIZED* g1);
90 
91 
92 #endif /* !defined _LWGEOM_RTREE_H */
unsigned int int32
Definition: shpopen.c:273
The following struct and methods are used for a 1D RTree implementation, described at: http://lin-ear...
Definition: lwgeom_rtree.h:45
The tree structure used for fast P-i-P tests by point_in_multipolygon_rtree()
Definition: lwgeom_rtree.h:57
LWMLINE * RTreeFindLineSegments(RTREE_NODE *root, double value)
Retrieves a collection of line segments given the root and crossing value.
Definition: lwgeom_rtree.c:450
struct rtree_node * leftNode
Definition: lwgeom_rtree.h:48
Representation for the y-axis interval spanned by an edge.
Definition: lwgeom_rtree.h:33
RTREE_INTERVAL * interval
Definition: lwgeom_rtree.h:47
struct rtree_node RTREE_NODE
The following struct and methods are used for a 1D RTree implementation, described at: http://lin-ear...
GSERIALIZED * geom1
Definition: lwgeom_rtree.h:69
GSERIALIZED * geom2
Definition: lwgeom_rtree.h:70
LWLINE * segment
Definition: lwgeom_rtree.h:50
struct rtree_node * rightNode
Definition: lwgeom_rtree.h:49
RTREE_NODE ** ringIndices
Definition: lwgeom_rtree.h:59
size_t geom1_size
Definition: lwgeom_rtree.h:71
RTREE_POLY_CACHE * index
Definition: lwgeom_rtree.h:74
RTREE_POLY_CACHE * GetRtreeCache(FunctionCallInfoData *fcinfo, GSERIALIZED *g1)
Checks for a cache hit against the provided geometry and returns a pre-built index structure (RTREE_P...
Definition: lwgeom_rtree.c:432
size_t geom2_size
Definition: lwgeom_rtree.h:72
This library is the generic geometry handling section of PostGIS.