<div dir="ltr">I'm doing some tests on fTools/Processing spatial operators, with a cover multilinestring layer and a base polygon layer.<div><br></div><div>Running the following query on PostGIS I get similar timings with st_intersection and st_difference:</div>
<div><br></div><div><div>select l.osm_id,ST_intersection(l.geom,e.geom) as geom from linee_selezione as l,edifici_buffer as e where ST_Intersects(l.geom, e.geom)</div><div><br></div><div>while if I run the Difference tool QGIS chokes and it takes magnitudes of more time then Clip.</div>
<div>If made both tools as similar as possible, just changing this [1] line of code, but the difference in execution time remains big.</div><div><br></div><div>I can't find out where is the difference, because both PostGIS and QGIS base the operations on GEOS.</div>
<div>Any hints?</div><div><br></div><div>giovanni</div><div><br></div><div>[1] <a href="https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/ftools/Clip.py#L107">https://github.com/qgis/QGIS/blob/master/python/plugins/processing/algs/qgis/ftools/Clip.py#L107</a></div>
<div><br></div>-- <br><div dir="ltr">Giovanni Allegri<br><a href="http://about.me/giovanniallegri" target="_blank">http://about.me/giovanniallegri</a><div>Twitter: <a href="https://twitter.com/_giohappy_" target="_blank">https://twitter.com/_giohappy_</a></div>
<div>blog: <a href="http://blog.spaziogis.it" target="_blank">http://blog.spaziogis.it</a><br>GEO+ geomatica in Italia <a href="http://bit.ly/GEOplus" target="_blank">http://bit.ly/GEOplus</a></div></div>
</div></div>