Clean invalid vector geometries with QGIS and the LWGEOM library
Why Geographic Information Systems Stack Exchange recommends it
GIS Stack Exchange users link it when answering questions about finding and repairing invalid or topologically broken geometries in QGIS.
Recommended by 1 people across 1 different months, 2014 to 2017.
What it is
A short 2014 screencast from Faunalia GIS showing how to repair invalid vector geometries in QGIS 2.x using the LWGEOM library, the same engine behind PostGIS ST_MakeValid. It walks through installing LWGEOM via OSGeo4W, adding the Processing LWGEOM Provider plugin, and pointing the Processing toolbox at the library.
What people said
Recommends Alexandre Neto · 2014-05 · Geographic Information Systems Stack Exchange · on “Identifying and highlighting invalid geometries using QGIS”
You can use Topology Checker plugin . With it you can set topological rules and highlight where the problems are. Check the documentation here [LINK] . Some error can be corrected by some processing tools. Please check this Faunalia videos: [this video] [LINK]
Cites ThomasG77 · 2015-05 · Geographic Information Systems Stack Exchange · on “Enabling LWGEOM for OGR tools (QGIS 2.8)?”
I just remember that LWGEOM was exposed to correct invalid geometries [this video] but I do not remember that `ST_Split()` was exposed. The OS is important for installation (because LWGEOM is a C extension). More a clue than a definitive answer.
Cites Jochen Schwarze · 2017-12 · Geographic Information Systems Stack Exchange · on “QGIS Spatial query error”
Agree that csv might cause problems. Another hint would be to check if your polygon layer has no topological inconsistencies (invalid geometries, i.e. duplicate consecutive points, self intersections, ...) You can check this under Vector > Topology Checker (under Plugins, active the Topology Checker Plugin). This shows you in the map where possible topo issues occur. For further reading about repairing invalid geometries i.e. cp. [LINK] Fixing geometry validity errors in QGIS? [LINK] [this video] It's not totally clear to me, whether you only want to select (or extract) the points WITHIN your polygon, or if you want to calculate statistics for the points within your polygons (counting them would
Cites Jochen Schwarze · 2017-12 · Geographic Information Systems Stack Exchange · on “QGIS Spatial query error”
not impossible, me thinks, without having had a closer look at. See [LINK] [LINK] [this video] for reference, or g**** for sth like 'qgis repair invalid geometry'