1610 double eps_sqr = epsilon * epsilon;
1616 stack[++sp] = inpts->
npoints-1;
1626 LWDEBUG(3,
"Added P0 to simplified point array (size 1)");
1633 LWDEBUGF(3,
"Farthest point from P%d-P%d is P%d (dist. %g)", p1, stack[sp], split, dist);
1635 if (dist > eps_sqr || ( outpts->
npoints+sp+1 < minpts && dist >= 0 ) )
1637 LWDEBUGF(4,
"Added P%d to stack (outpts:%d)", split, sp);
1638 stack[++sp] = split;
1646 LWDEBUGF(4,
"Added P%d to simplified point array (size: %d)", stack[sp], outpts->
npoints);
1651 LWDEBUGF(4,
"stack pointer = %d", sp);
#define LWDEBUG(level, msg)
int ptarray_append_point(POINTARRAY *pa, const POINT4D *pt, int repeated_points)
Append a point to the end of an existing POINTARRAY If allow_duplicate is LW_FALSE, then a duplicate point will not be added.
#define FLAGS_GET_Z(flags)
Macros for manipulating the 'flags' byte.
POINTARRAY * ptarray_construct_empty(char hasz, char hasm, uint32_t maxpoints)
Create a new POINTARRAY with no points.
#define FLAGS_GET_M(flags)
void * lwalloc(size_t size)
#define LWDEBUGF(level, msg,...)
#define FLAGS_NDIMS(flags)
int getPoint4d_p(const POINTARRAY *pa, int n, POINT4D *point)
static void ptarray_dp_findsplit(POINTARRAY *pts, int p1, int p2, int *split, double *dist)