Skip to content

Commit

Permalink
fix #13067 : bad geometries in the difference tool
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry committed Jul 3, 2015
1 parent 2083d6d commit fe1a032
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 fe1a032

Please sign in to comment.