[postgis-devel] SnapToGrid and higher dimensions

Alex Mayrhofer axelm-postgis at nona.net
Thu Dec 1 11:35:46 PST 2005


strk at refractions.net wrote:
> Suggestions ?

What about silently adding 3/4D support to the simple

SnapToGrid(geom, size)

function, and provide new functions like

SnapToGrid3D(...)
SnapToGrid4D(...)

for the versions with different sizes? Not a perfect solution, but would
continue the "area2d" etc. naming scheme...

Another solution would be to provide a

SnapToGrid(geometry, geometry)

function, where the first geometry would be the one to be snapped, and the
second one a LINESTRING(xoffset yoffset zoffset moffset, xsize, ysize,
zsize, msize) which gives grid offsets and size...

Not a nice solution, too, but easily to be distinguished from the other
versions...

cheers

alex




More information about the postgis-devel mailing list