PostGIS  2.2.7dev-r@@SVN_REVISION@@

◆ cmpfunc()

static int cmpfunc ( const void *  a,
const void *  b 

We create the minheap by ordering the minheap array by the areas in the areanode structs that the minheap keys refere to.

Definition at line 91 of file effectivearea.c.

Referenced by tune_areas().

92 {
93  double v1 = (*(areanode**)a)->area;
94  double v2 = (*(areanode**)b)->area;
95  /*qsort gives unpredictable results when comaping identical values.
96  If two values is the same we force returning the last point in hte point array.
97  That way we get the same ordering on diffreent machines and pllatforms*/
98  if (v1==v2)
99  return (*(areanode**)a)-(*(areanode**)b);
100  else
101  return (v1>v2 ) ? 1 : -1;
102 }
This structure is placed in an array with one member per point.
Definition: effectivearea.h:24
Here is the caller graph for this function: