Make a GEOSSTRtree that stores a pointer to a variable containing the array index of the input geoms.
Definition at line 81 of file lwgeom_geos_cluster.c.
82{
87
89 if (
tree.tree == NULL)
90 {
92 }
95
96 if (is_lwgeom)
97 {
98 uint32_t i;
101 {
102 tree.geom_ids[i] = i;
104 GEOSSTRtree_insert(
tree.tree,
tree.envelopes[i], &(
tree.geom_ids[i]));
105 }
106 }
107 else
108 {
109 uint32_t i;
110 tree.envelopes = NULL;
112 {
113 tree.geom_ids[i] = i;
114 GEOSSTRtree_insert(
tree.tree, geoms[i], &(
tree.geom_ids[i]));
115 }
116 }
117
119}
void * lwalloc(size_t size)
static const int STRTREE_NODE_CAPACITY
static GEOSGeometry * geos_envelope_surrogate(const LWGEOM *g)
GEOSGeometry ** envelopes
References STRTree::envelopes, geos_envelope_surrogate(), lwalloc(), STRTree::num_geoms, STRTREE_NODE_CAPACITY, and STRTree::tree.
Referenced by union_dbscan_general(), union_dbscan_minpoints_1(), and union_intersecting_pairs().