I want to run the process "qgis:intersection" in a pyton-script and try it like this:
import processing a1 = QgsMapLayerRegistry.instance().mapLayersByName('Layer1') a2 = QgsMapLayerRegistry.instance().mapLayersByName('Layer2') processing.runandload("qgis:intersection", a1, a2, "memory:myCut")
But there comes the "Problem executing algorithm" message: "GEOS geoprocessing error: One or more input features have invalid geometry."
then everything is ok and qgis do the intersection.
Doing the intersectin with QGIS 2.18.13 with the gui, I become also an error like above.
"Layer2" is a large layer with some hundredthousands polygons an if i use the "Topology Checker" i get about 600 invalid geometries.
Why does the intersection work only with the qgis-gui in 2.14.21 and not somewhere else?