424{
427 int changed;
428 int iterations = 0;
429
431
432
433
434 do {
436 ++iterations;
440 tmp = tmp2;
441 } while ( changed && iterations <= maxiterations );
442
443 LWDEBUGF(1,
"It took %d/%d iterations to properly snap",
444 iterations, maxiterations);
445
446 return tmp;
447}
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,...)