3293 LWGEOM *lwgeom1, *lwgeom2, *lwresult;
3296 geom1 = PG_GETARG_GSERIALIZED_P(0);
3297 geom2 = PG_GETARG_GSERIALIZED_P(1);
3298 tolerance = PG_GETARG_FLOAT8(2);
3303 lwresult =
lwgeom_snap(lwgeom1, lwgeom2, tolerance);
3306 PG_FREE_IF_COPY(geom1, 0);
3307 PG_FREE_IF_COPY(geom2, 1);
3309 result = geometry_serialize(lwresult);
3312 PG_RETURN_POINTER(
result);
char result[OUT_DOUBLE_BUFFER_SIZE]
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
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.