484{
487 int changed;
488 int iterations = 0;
489
491
492
493
494 do {
496 ++iterations;
500 tmp = tmp2;
501 } while ( changed && iterations <= maxiterations );
502
503 LWDEBUGF(1,
"It took %d/%d iterations to properly snap",
504 iterations, maxiterations);
505
506 return tmp;
507}
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,...)