[postgis-users] ST_SnapToGrid makes a geometry lose its validity

Paolo Crosato paolo.crosato at targaubiest.com
Wed Feb 20 08:09:18 PST 2013


Hi,

I have a test case for a geometry that lose its validity when snapped by 
ST_SnapToGrid.
The geometry is pretty big, I attached it to the message.
You can test the behaviour with:

select ST_isValid(<geom>);
--t
select ST_isValid(ST_SnapToGrid(<geom>,1e-6));
--f

I know the function could make the geometry lose its simplicity, however 
the documentation does not
say anything about validity.

My postgis version is:

"POSTGIS="2.0.2 r10789" GEOS="3.3.6-CAPI-1.7.6" PROJ="Rel. 4.8.0, 6 
March 2012" GDAL="GDAL 1.9.1, released 2012/05/15" LIBXML="2.7.6" 
LIBJSON="UNKNOWN" TOPOLOGY RASTER"

Regards,

Paolo

-- 
Paolo Crosato


-------------- next part --------------
A non-text attachment was scrubbed...
Name: st_snap_to_grid_dump.csv.7z
Type: application/x-7z-compressed
Size: 61586 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20130220/6d154a10/attachment.7z>


More information about the postgis-users mailing list