PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ circ_nodes_sort()

static void circ_nodes_sort ( CIRC_NODE **  nodes,
int  num_nodes 
)
static

Given a list of nodes, sort them into a spatially consistent order, then pairwise merge them up into a tree.

Should make handling multipoints and other collections more efficient

Definition at line 403 of file lwgeodetic_tree.c.

404 {
405  qsort(nodes, num_nodes, sizeof(CIRC_NODE*), circ_node_compare);
406 }
static int circ_node_compare(const void *v1, const void *v2)
Comparing on geohash ensures that nearby nodes will be close to each other in the list.
Note that p1 and p2 are pointers into an independent POINTARRAY, do not free them.

References circ_node_compare().

Referenced by lwcollection_calculate_circ_tree(), and lwpoly_calculate_circ_tree().

Here is the call graph for this function:
Here is the caller graph for this function: