[GIS] Invalid Geometry QGIS

geometryqgisunion

I have a polygon layer (obtained from Raster to Polygon) with some invalid geometries. I would like to know how can I solve this without going one by one

enter image description here


This may be what answer is suggesting:

enter image description here


After trying solution from answer, the result is not correct.

Any idea?

enter image description here

Best Answer

A few options for you:

PostGIS (if available, easy to install locally if not and well worth it)

UPDATE TABLE schema.tablename set geom = ST_MakeValid(geom);

There is also the geometry checker plugin that ships with QGIS but is usually turned off (installed plugins), that has the option to fix all errors.

GRASS v.clean is also an option, available under processing tools in QGIS.