0

I received a shapefile which is the result of a combination of several polygon. I want to clean and simplify it as there are many useless vertex as you can see on the picture. This is only one feature so there is no need for all the lines in the middle. Just one simple polygon would be just fine. I tried the function "simplify" but it doesn't change anything. Merge and dissolve functions won't do the trick neither. So I'm not sure how to proceed.

enter image description here

  • If that's one polygon, it's hopelessly invalid, violating topology rules every 4-10 vertices. Whomever generated that file made an excellent case against publishing the shapefile standard. The best you can hope for is to extract the vertices and constuct a convex or concave hull. – Vince Aug 7 '18 at 12:34
  • I was about to make the same comment as Vince ... you say there are "many useless vertex as u can see" ... hard to say what is a meaningful vertex or a meaningless one without knowing the history and the meaning ou your data. And : How can a "simple polygon" be so "intricately" digitized ... ;-p – snaileater Aug 7 '18 at 12:38
  • It is easy to create such polygons, just keep your GPS recording points every second while you do not move. – user30184 Aug 7 '18 at 14:24
  • I fully agree with you. I don't know how such a polygon can be created but it is really difficult to have access to the original data. The history of the data, in two words, is the addition of all the disturbances that have been done on a sea bed region. Thus only the external vertex of the polygon would be enough to give the information of the disturbed area. I'll try the hull function. Thanks – Nicolas deville Aug 8 '18 at 8:42
1

This polygon has invalid geometry, because the edges intersect. Standard geometry correction methods are unlikely to work.

Fortunately, you only have one feature, so you don't need an automated method. Instead, you can digitize a new polygon by tracing the outline of the invalid one.

  1. Turn on snapping (snapping toolbar in version 3.0 and later, Settings menu > options in 2.18 and older). Snapping settings:
    • Active layer
    • Snap to vertex
    • 10 pixels
    • Enable tracing
  2. Put the layer in editing mode. Add a new polygon to this layer by tracing around the outside of the existing polygon.
    • Note that you can zoom in and out while digitizing by using the scroll button on your mouse.
    • You can pan the map while digitizing by holding the space bar and moving the mouse.
  3. Optional: copy attributes. Select both polygons and use the merge attributes tool (advanced digitizing toolbar) to copy attributes from the old polygon to the new one.
  4. Delete the old polygon.
  5. Save the edits.
  • 1
    Or you could try using the vertex editor to select and delete all the interior vertices. But if the exterior vertices are not in the correct order, you may still end up with an invalid polygon. Be sure to have a back up copy of the shapefile before trying this. – csk Aug 7 '18 at 19:01
  • Thanks for your input. I manage to clean the polygon by splitting the polygone into multiple small polygon then using the convex hull to "recreate" the outer boundaries of the polygon. Cheers – Nicolas deville Aug 8 '18 at 13:23
-1

May be with a buffer with a zero as distance?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.