From: Daniel Baston Date: Mon, 28 Dec 2015 22:23:25 +0000 (+0000) Subject: #3411, Clustering functions not using spatial index X-Git-Tag: 2.3.0beta1~309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ff9c1470fb2ca32ab19569bb570decc9f62accb;p=postgis #3411, Clustering functions not using spatial index git-svn-id: http://svn.osgeo.org/postgis/trunk@14530 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwgeom_geos_cluster.c b/liblwgeom/lwgeom_geos_cluster.c index 38e145fc4..97a6fdb85 100644 --- a/liblwgeom/lwgeom_geos_cluster.c +++ b/liblwgeom/lwgeom_geos_cluster.c @@ -22,7 +22,6 @@ * **********************************************************************/ - #include #include "liblwgeom.h" #include "liblwgeom_internal.h" @@ -30,6 +29,8 @@ #include "lwgeom_geos.h" #include "lwunionfind.h" +static const int STRTREE_NODE_CAPACITY = 10; + /* Utility struct used to pass information to the GEOSSTRtree_query callback */ struct UnionIfIntersectingContext { @@ -71,7 +72,7 @@ static struct STRTree make_strtree(void** geoms, uint32_t num_geoms, char is_lwgeom) { struct STRTree tree; - tree.tree = GEOSSTRtree_create(num_geoms); + tree.tree = GEOSSTRtree_create(STRTREE_NODE_CAPACITY); if (tree.tree == NULL) { return tree;