[postgis-users] detect poly's with duplicated vertex

Kevin Neufeld kneufeld at refractions.net
Sat Oct 20 23:17:10 PDT 2007


Try using ST_SnapToGrid(geometry, size) will remove coincident points.

To identify polygons with dups,

SELECT *
FROM mypolytable
WHERE ST_NPoints(geom) != ST_NPoints(ST_SnapToGrid(geom, <some precision>));

-- Kevin

Rob Agar wrote:
> hi all,
>
> Another quick question - is there a function for detecting polygons 
> with one or more sequential duplicated points?  Basically, I want to 
> find and replace polys like "abccd" with "abcd".
>
> cheers
> Rob
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users



More information about the postgis-users mailing list