Skip to content

Instantly share code, notes, and snippets.

@pigreco
Created February 14, 2018 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pigreco/2e3468053c86e4975b46f77215a89cef to your computer and use it in GitHub Desktop.
Save pigreco/2e3468053c86e4975b46f77215a89cef to your computer and use it in GitHub Desktop.
computo indice di boscosita tramite spatialite - https://www.lezionigis.it/es09/lezioni gis
create table indice_boscosita as
select COMUNE,CastToMultiPolygon(st_union(st_intersection (clc.geom, com.geom))) as geom, count (*)as nro,
(sum (st_area(st_intersection (clc.geom, com.geom))) / st_area(com.geom))*100.00 as indice
from CLC_Molise clc, comuni_molise com
where liv_3 like 'Boschi%' and st_intersects (clc.geom, com.geom) = 1
group by 1
order by indice desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment