415{
418 int changed;
419 int iterations = 0;
420
422
423
424
425 do {
427 ++iterations;
431 tmp = tmp2;
432 } while ( changed && iterations <= maxiterations );
433
434 LWDEBUGF(1,
"It took %d/%d iterations to properly snap",
435 iterations, maxiterations);
436
437 return tmp;
438}
void lwgeom_free(LWGEOM *geom)
LWGEOM * lwgeom_snap(const LWGEOM *geom1, const LWGEOM *geom2, double tolerance)
Snap vertices and segments of a geometry to another using a given tolerance.
uint32_t lwgeom_count_vertices(const LWGEOM *geom)
Count the total number of vertices in any LWGEOM.
#define LWDEBUGF(level, msg,...)