Skip to content

Commit

Permalink
[processing] fix buffer tool
Browse files Browse the repository at this point in the history
(cherry picked from commit 9976c30)
  • Loading branch information
alexbruy committed Jul 22, 2016
1 parent 491f6f8 commit dc4ed2c
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 @@ -57,8 +57,11 @@ def buffering(progress, writer, distance, field, useField, layer, dissolve,
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)
if first:
Expand Down

0 comments on commit dc4ed2c

Please sign in to comment.