Skip to content

Instantly share code, notes, and snippets.

@pigreco
Created March 22, 2018 22:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
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