Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] also fix case without dissolving
(cherry picked from commit 2fbb617)
  • Loading branch information
alexbruy committed Jul 22, 2016
1 parent ec8e35e commit 5511a73
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions python/plugins/processing/algs/qgis/Buffer.py
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 5511a73

Please sign in to comment.