I'm trying to delete duplicate nodes from a shapefile with QGIS, but after running the tool to delete it, nothing happens and shows the same errors.
I thought that maybe importing to postgis could be easier. What I want to do is:
Extract points from polygon (this is already done)
Delete the duplicate points
¿with st_equals?
To finish, reshape the points to polygons without the duplicate points.
Anyone know if this methodology would be ok? I can do the first and second steps, but don't know if number 3 is possible, or if there is a better alternative.
Any clue or suggestion?
-
2It may be as easy as to simplify with zero tolerance. At least worth a try.user30184– user301842014年08月14日 14:55:13 +00:00Commented Aug 14, 2014 at 14:55
-
1be careful that there is a mandatory duplicate node at the start/end of the drawing. Removing one of those points could corrupt your data. I recommend that you use simplify with a diminutive tolerance, as suggested by @user30184radouxju– radouxju2014年08月14日 15:04:54 +00:00Commented Aug 14, 2014 at 15:04
-
you are right. st_simplify(geom,0) is the best solution. ThanksPablo Pardo– Pablo Pardo2014年08月14日 17:44:21 +00:00Commented Aug 14, 2014 at 17:44
1 Answer 1
If you are running PostGIS 2.0+, you can use the ST_RemoveRepeatedPoints function, so no need to go thru all that trouble of extracting and reconstituting
http://postgis.net/docs/manual-2.1/ST_RemoveRepeatedPoints.html
UPDATE yourpolygontable SET geom = ST_RemoveRepeatedPoints(geom);