<div dir="ltr"><div><div><div><div><div><div>Hi,<br></div>i'm trying to create a script that use qgis api to do an intersection between two shp .<br></div>The script works fine in the Qgis python console returning "true" and creating the intersect <br>
</div>shp, instead in the python console returns "false"  <br><br>from qgis.core import *<br>from qgis import *<br>import qgis.utils<br>from qgis import analysis<br>from qgis.analysis import * <br><br>QgsApplication.initQgis()<br>
<br>shpA = QgsVectorLayer("/home/selv/tmp/for_clip.shp" , "layerA", "ogr")<br>shpB = QgsVectorLayer("/home/selv/tmp/bug5598.shp"   , "layerB", "ogr")<br>QgsOverlayAnalyzer().intersection( shpA , shpB  , "/home/selv/tmp/test.shp")<br>
<br></div>so after this lines i get <br></div>true in the qgis python console (the intersect shp is created)<br></div>false in the python console        (the intersect shp is not created)<div><div><div><div><div><div><div>
<br></div><div>Should i load other modules? or do i missing something else? <br></div><div><br></div><div>Thanks<br></div><div>Regards<br></div><div>Giuseppe<br></div><div><br><br>-- <br>Giuseppe Amatulli<br>Web: <a href="http://www.spatial-ecology.net" target="_blank">www.spatial-ecology.net</a>
</div></div></div></div></div></div></div></div>