Skip to content

Commit

Permalink
[BUG] make sure that result line consists of two nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard Ströbl authored and m-kuhn committed Mar 14, 2016
1 parent 97b0375 commit e02d36f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/plugins/processing/algs/qgis/SplitLinesWithLines.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ def processAlgorithm(self, progress):
inLines = outLines

for aLine in inLines:
if len(aLine.asPolyline()) > 2 or aLine.asPolyline()[0] != aLine.asPolyline()[1]:
if len(aLine.asPolyline()) > 2 or \
(len(aLine.asPolyline()) == 2 and \
aLine.asPolyline()[0] != aLine.asPolyline()[1]):
# sometimes splitting results in lines of zero length
outFeat.setGeometry(aLine)
writer.addFeature(outFeat)
Expand Down

0 comments on commit e02d36f

Please sign in to comment.