PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ uniq()

static int uniq ( double *  vals,
int  nvals 
)
static

Definition at line 1093 of file lwlinearreferencing.c.

1094{
1095 int i, last = 0;
1096 for (i = 1; i < nvals; ++i)
1097 {
1098 // lwnotice("(I%d):%g", i, vals[i]);
1099 if (vals[i] != vals[last])
1100 {
1101 vals[++last] = vals[i];
1102 // lwnotice("(O%d):%g", last, vals[last]);
1103 }
1104 }
1105 return last + 1;
1106}

Referenced by lwgeom_cpa_within(), and lwgeom_tcpa().

Here is the caller graph for this function: