3

I'm trying to obtain the boundaries of shapefile, thus to clean the inside as a matter of speaking. While I had expected that dissolve while get me a proper polygon, unfortunately it still has some remainders. How could I get rid of them?

Does QGIS have a tool similar to Repair Geometry?

Here's the source

enter image description here

Result below:

enter image description here

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
Geosphere
  • 763
  • 6
  • 21
  • Could you add two source polygons which lead to bad result as WKT into your question? – user30184 May 23 '15 at 20:20
  • Sorry, but I didn't quite understood your question. What I'm using is a polygon-type shapefile that has multiple fields. – Geosphere May 23 '15 at 20:23
  • Then, if GRASS GIS is a solution. Could you kindly give me an answer to this one? http://gis.stackexchange.com/questions/148351/activating-grass-gis-in-qgis – Geosphere May 23 '15 at 20:39
  • Repair Geometry likely wouldn't work here as those are probably not actually errors but simply gaps/slivers in the original data. In QGIS there is a Check Geometry Validity tool, but it doesn't do repairs. You'd have to look at v.clean and st_makevalid for those functions. Some alternative solutions to your problem from the possible duplicate are found at http://gis.stackexchange.com/questions/112687/ and http://gis.stackexchange.com/questions/127541/ – Chris W May 23 '15 at 20:40
  • Aha, alright. I will check those options, tried to eliminate them manually via editing the vertices. Unfortunately, I seem to have problems with actually selecting them instead of the whole polygon. – Geosphere May 23 '15 at 20:49
  • If the polygons are too messy, and you do not care too much about the attributes, you might simply rasterize the whole thing, and then vectorize the result back. I have done this with messy polygons before and can attest that this works OK. –  May 23 '15 at 20:52
  • Ok, interesting, but I think I'm doing something wrong as I'm getting a square vector polygon that the previous shape of the vector inside. Tried to do a dissolve right after but it did not work. – Geosphere May 23 '15 at 21:04
  • In any case, I managed to remove them with ArcGIS but I would have preferred to stick to open source this time. – Geosphere May 23 '15 at 21:14
  • 1
    I meant that you should try to simplify the problem by finding only two polygons which yield a bad result as dissolved. With Well Known Text presentation you could share the data and others could play with those and perhaps suggest a solution. – user30184 May 23 '15 at 21:34
  • Ok, now I understand what you mean.I'll keep it in mind for next time. Thanks! – Geosphere May 23 '15 at 21:49
  • You can draw a new polygon layer on top of the residual lines and then dissolve the boundaries of the two polygones. It's quite easy and it worked for me. – Elsa Jul 29 '18 at 18:58

2 Answers2

5

You can use grass, tool named v.clean. There, you set rmarea. The threshold parameter will be in unit of theme. All feature which have area less than treshold will be deleted.

Diogo Caribé
  • 1,960
  • 1
  • 23
  • 37
0

Just to add to this - in QGIS 3 there is now a native tool that does this called "Fix Geometries" Read about it here

AWGIS
  • 3,220
  • 1
  • 21
  • 36