<html><head></head><body>Probabilmente perché restituisce una geomertycollection?<br><br><div class="gmail_quote">Il 13 febbraio 2018 16:28:01 CET, "Totò" <pigrecoinfinito@gmail.com> ha scritto:<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">Totò wrote<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"> select COMUNE,st_intersection (clc.geom, com.geom) as geom, count (*)as<br> nro,<br> (sum (st_area( st_intersection (clc.geom, com.geom)))/st_area(com.geom))<br> as<br> indice<br> from  CLC_Molise clc, comuni_molise com <br> where  liv_3 like 'Boschi %' and st_intersects (clc.geom, com.geom) = 1<br> group by 1<br> order by indice desc;<br> <br> QGIS vede la tabella e il campo geom2 (MULTIPOLYGON) ma non visualizza,<br> nel<br> canvas, tutte le feature nonostante la tabella degli attributi sia<br> corretta,<br> cioè il numero atteso di righe è corretto ma le geometrie che visualizza<br> non<br> sono corrette.<br></blockquote><br>Ho apportato una modifica alla query, eccola:<br><br>select COMUNE,st_union(st_intersection (clc.geom, com.geom)) as geom, count<br>(*)as nro,<br>(sum (st_area(st_intersection (clc.geom, com.geom))) /<br>st_area(com.geom))*100.00 as indice <br>from  CLC_Molise clc, comuni_molise com <br>where  liv_3 like 'Boschi%' and st_intersects (clc.geom, com.geom) = 1<br>group by 1<br>order by indice desc<br><br>la modifica riguardo l'aggiunta di st_union();<br>questa aggiunta, dopo tutte le altre correzioni descritte sopra, rende<br>visibile nel canvas tutte le geometrie.<br>Credo di aver risolto! ma restano ancora dubbi: perchè i calcoli li fa<br>correttamente ma non visualizzava correttamente le geometrie?<br>saluti.<br><br><br><br>-----<br><a href="https://pigrecoinfinito.wordpress.com/">https://pigrecoinfinito.wordpress.com/</a><br>--<br>Sent from: <a href="http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html">http://osgeo-org.1560.x6.nabble.com/QGIS-Italian-User-f5250612.html</a><br><hr><br>QGIS-it-user mailing list<br>QGIS-it-user@lists.osgeo.org<br><a href="https://lists.osgeo.org/mailman/listinfo/qgis-it-user">https://lists.osgeo.org/mailman/listinfo/qgis-it-user</a><br></pre></blockquote></div><br>
-- <br>
Sorry for being short</body></html>