[QGIS-it-user] QGIS e

Totò pigrecoinfinito a gmail.com
Mar 13 Feb 2018 07:28:01 PST


Totò wrote
> select COMUNE,st_intersection (clc.geom, com.geom) as geom, count (*)as
> nro,
> (sum (st_area( st_intersection (clc.geom, com.geom)))/st_area(com.geom))
> 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;
> 
> QGIS vede la tabella e il campo geom2 (MULTIPOLYGON) ma non visualizza,
> nel
> canvas, tutte le feature nonostante la tabella degli attributi sia
> corretta,
> cioè il numero atteso di righe è corretto ma le geometrie che visualizza
> non
> sono corrette.

Ho apportato una modifica alla query, eccola:

select COMUNE,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

la modifica riguardo l'aggiunta di st_union();
questa aggiunta, dopo tutte le altre correzioni descritte sopra, rende
visibile nel canvas tutte le geometrie.
Credo di aver risolto! ma restano ancora dubbi: perchè i calcoli li fa
correttamente ma non visualizzava correttamente le geometrie?
saluti.



-----
https://pigrecoinfinito.wordpress.com/
--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html


Maggiori informazioni sulla lista QGIS-it-user