<!DOCTYPE html>
<html><head>
    <meta charset="UTF-8">
</head><body><p>Ciao,<br></p><p>scusate se mi intrometto, ma perchè occorre creare un nuovo campo geometry. non si può utilizzare direttamente CastToMultiPolygon() nella query di partenza?<br></p><p>select COMUNE, CastToMultiPolygon(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;</p><blockquote><p>Il 13 febbraio 2018 alle 16.41 Totò <pigrecoinfinito@gmail.com> ha scritto:</p><p>pcav wrote</p><blockquote><p>Probabilmente perché restituisce una geomertycollection?</p></blockquote><p>SI, la query restituisce una geomertycollection cioè:<br>facendo un check della geometria ho due record; polygon e multipolygon;</p><p>come scritto sopra, Furieri ha spiegato che basti creare un altro campo<br>geom2 e popolarlo forzando, come tipologia di geometria, multipolygon.</p><p>saluti</p><p>-----</p><p><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></p><p>_______________________________________________<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></p></blockquote></body></html>