PostGIS  2.4.9dev-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 401 of file lwgeodetic_tree.c.

References circ_node_compare().

Referenced by lwcollection_calculate_circ_tree(), and lwpoly_calculate_circ_tree().

402 {
403  qsort(nodes, num_nodes, sizeof(CIRC_NODE*), circ_node_compare);
404 }
Note that p1 and p2 are pointers into an independent POINTARRAY, do not free them.
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...
Here is the call graph for this function:
Here is the caller graph for this function: