Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
query di aggiornamento per correzione geometrie non valide istat
-- per i comuni
UPDATE Com01012018_WGS84
SET geom = MakeValid(geom)
WHERE ST_IsValid(geom) <> 1;
-- per le province:
UPDATE ProvCM01012018_WGS84
SET geom = MakeValid(geom)
WHERE ST_IsValid(geom) <> 1;
-- per le regioni:
UPDATE Reg01012018_WGS84
SET geom = MakeValid(geom)
WHERE ST_IsValid(geom) <> 1;
-- ed infine:
UPDATE RipGeo01012018_WGS84
SET geom = MakeValid(geom)
WHERE ST_IsValid(geom) <> 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment