Skip to content
Permalink
Browse files

[Processing] bugfix: intersection QGIS algorithm

fixing this by testing int_com.
```
Traceback (most recent call last):
File "C:/PROGRA~1/QGIS2~1.17/apps/qgis/./python/plugins\processing\core\GeoAlgorithm.py", line 203, in execute
self.processAlgorithm(progress)
File "C:/PROGRA~1/QGIS2~1.17/apps/qgis/./python/plugins\processing\algs\qgis\Intersection.py", line 100, in processAlgorithm
int_geom = QgsGeometry(int_com.difference(int_sym))
```

AttributeError: 'NoneType' object has no attribute 'difference'
(cherry picked from commit 3661bc3)
(cherry picked from commit 5b57317)
  • Loading branch information
rldhont authored and alexbruy committed Sep 19, 2016
1 parent a465b0e commit fb2c167344d02eee73b0c77407c0b23582fe6239
Showing with 4 additions and 2 deletions.
  1. +4 −2 python/plugins/processing/algs/qgis/Intersection.py
@@ -87,8 +87,10 @@ def processAlgorithm(self, progress):
int_geom = QgsGeometry(geom.intersection(tmpGeom))
if int_geom.wkbType() == QGis.WKBUnknown or QgsWKBTypes.flatType(int_geom.geometry().wkbType()) == QgsWKBTypes.GeometryCollection:
int_com = geom.combine(tmpGeom)
int_sym = geom.symDifference(tmpGeom)
int_geom = QgsGeometry(int_com.difference(int_sym))
int_geom = QgsGeometry()
if int_com is not None:
int_sym = geom.symDifference(tmpGeom)
int_geom = QgsGeometry(int_com.difference(int_sym))
if int_geom.isGeosEmpty() or not int_geom.isGeosValid():
ProcessingLog.addToLog(ProcessingLog.LOG_ERROR,
self.tr('GEOS geoprocessing error: One or '

0 comments on commit fb2c167

Please sign in to comment.
You can’t perform that action at this time.