1471 double tolsq = tolerance * tolerance;
1478 double dsq = FLT_MAX;
1481 if ( n_points <= min_points )
return;
1484 for (i = 1; i < n_points; i++)
1486 int last_point = (i == n_points-1);
1492 if (n_points + n_points_out > min_points + i)
1494 if (tolerance > 0.0)
1499 if (!last_point && dsq <= tolsq)
1507 if (memcmp((
char*)pt, (
char*)last, pt_size) == 0)
1515 if (last_point && n_points_out > 1 && tolerance > 0.0 && dsq <= tolsq)
int ptarray_point_size(const POINTARRAY *pa)
const POINT2D * getPoint2d_cp(const POINTARRAY *pa, int n)
Returns a POINT2D pointer into the POINTARRAY serialized_ptlist, suitable for reading from...
static void ptarray_copy_point(POINTARRAY *pa, uint32_t from, uint32_t to)
double distance2d_sqr_pt_pt(const POINT2D *p1, const POINT2D *p2)