Skip to content
Permalink
Browse files

[BUG] make sure that result line consists of two nodes

  • Loading branch information
bstroebl authored and m-kuhn committed Mar 14, 2016
1 parent 97b0375 commit e02d36f83029d5fbec4bf9edae8633010a0234c4
Showing with 3 additions and 1 deletion.
  1. +3 −1 python/plugins/processing/algs/qgis/SplitLinesWithLines.py
@@ -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)

0 comments on commit e02d36f

Please sign in to comment.
You can’t perform that action at this time.