4

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:

  1. Extract points from polygon (this is already done)

  2. Delete the duplicate points ¿with st_equals?

  3. 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?

Joseph
76.7k8 gold badges173 silver badges286 bronze badges
asked Aug 14, 2014 at 14:50
3
  • 2
    It may be as easy as to simplify with zero tolerance. At least worth a try. Commented Aug 14, 2014 at 14:55
  • 1
    be 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 @user30184 Commented Aug 14, 2014 at 15:04
  • you are right. st_simplify(geom,0) is the best solution. Thanks Commented Aug 14, 2014 at 17:44

1 Answer 1

5

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);

answered Aug 14, 2014 at 21:25

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.