Skip to content

Commit

Permalink
fix #13067 : bad geometries in the difference tool
Browse files Browse the repository at this point in the history
(cherry picked from commit fe1a032)
  • Loading branch information
Gustry authored and jef-n committed Jul 5, 2015
1 parent 7b15f7a commit 2e77e9c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/plugins/fTools/tools/doGeoprocessing.py
Expand Up @@ -893,6 +893,10 @@ def difference( self ):
try:
if diff_geom.intersects( tmpGeom ):
diff_geom = QgsGeometry( diff_geom.difference( tmpGeom ) )
if diff_geom.isGeosEmpty():
GEOS_EXCEPT = False
add = False
break
except:
GEOS_EXCEPT = False
add = False
Expand Down
4 changes: 4 additions & 0 deletions python/plugins/processing/algs/qgis/Difference.py
Expand Up @@ -92,6 +92,10 @@ def processAlgorithm(self, progress):
try:
if diff_geom.intersects(tmpGeom):
diff_geom = QgsGeometry(diff_geom.difference(tmpGeom))
if diff_geom.isGeosEmpty():
GEOS_EXCEPT = False
add = False
break
except:
GEOS_EXCEPT = False
add = False
Expand Down

0 comments on commit 2e77e9c

Please sign in to comment.