344 grid.
ipx = PG_GETARG_FLOAT8(1);
345 grid.
ipy = PG_GETARG_FLOAT8(2);
346 grid.
xsize = PG_GETARG_FLOAT8(3);
347 grid.
ysize = PG_GETARG_FLOAT8(4);
352 PG_RETURN_POINTER(in_geom);
358 PG_RETURN_POINTER(in_geom);
363 POSTGIS_DEBUGF(3,
"SnapToGrid got a %s",
lwtype_name(in_lwgeom->
type));
366 if ( out_lwgeom == NULL ) PG_RETURN_NULL();
369 if ( in_lwgeom->
bbox )
372 POSTGIS_DEBUGF(3,
"SnapToGrid made a %s",
lwtype_name(out_lwgeom->
type));
374 out_geom = geometry_serialize(out_lwgeom);
376 PG_RETURN_POINTER(out_geom);
LWGEOM * lwgeom_from_gserialized(const GSERIALIZED *g)
Allocate a new LWGEOM from a GSERIALIZED.
int gserialized_is_empty(const GSERIALIZED *g)
Check if a GSERIALIZED is empty without deserializing first.
void lwgeom_refresh_bbox(LWGEOM *lwgeom)
Drop current bbox and calculate a fresh one.
LWGEOM * lwgeom_grid(const LWGEOM *lwgeom, gridspec *grid)
const char * lwtype_name(uint8_t type)
Return the type name string associated with a type number (e.g.