Skip to content

Commit

Permalink
[processing] also fix case without dissolving
Browse files Browse the repository at this point in the history
(cherry picked from commit 2fbb617)
  • Loading branch information
alexbruy committed Jul 22, 2016
1 parent dc4ed2c commit bcb2639
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/plugins/processing/algs/qgis/Buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ def buffering(progress, writer, distance, field, useField, layer, dissolve,
else:
value = distance
inGeom = QgsGeometry(inFeat.geometry())
if inGeom.isGeosEmpty() or not inGeom.isGeosValid():
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING, 'Feature {} has empty or invalid geometry. Skipping...'.format(inFeat.id()))
if inGeom.isGeosEmpty():
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING, 'Feature {} has empty geometry. Skipping...'.format(inFeat.id()))
continue
if not inGeom.isGeosValid():
ProcessingLog.addToLog(ProcessingLog.LOG_WARNING, 'Feature {} has invalid geometry. Skipping...'.format(inFeat.id()))
continue

outGeom = inGeom.buffer(float(value), segments)
Expand Down

0 comments on commit bcb2639

Please sign in to comment.