Fix QPV validity
✓ Published0🌍 Public
TThomasG77
Last edited Jul 6, 2022
Created on Jul 6, 2022
This example demonstrates how to repair invalid geometries in a shapefile of priority neighborhoods (QP) in France. It first checks the validity of the original dataset using `ogrinfo` with a SQLite dialect and the `IsValid` function. The script then uses `ogr2ogr` to create a corrected output file by applying `ST_MakeValid` to any invalid geometries, preserving the original attributes and coordinate system. Finally, it re-runs the validity check to confirm that all geometries in the output are now valid. The data originates from the French government's SIG website.
AI-generated description