Skip to content

Commit e02d36f

Browse files
Bernhard Ströblm-kuhn
authored andcommittedMar 14, 2016
[BUG] make sure that result line consists of two nodes
1 parent 97b0375 commit e02d36f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎python/plugins/processing/algs/qgis/SplitLinesWithLines.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ def processAlgorithm(self, progress):
129129
inLines = outLines
130130

131131
for aLine in inLines:
132-
if len(aLine.asPolyline()) > 2 or aLine.asPolyline()[0] != aLine.asPolyline()[1]:
132+
if len(aLine.asPolyline()) > 2 or \
133+
(len(aLine.asPolyline()) == 2 and \
134+
aLine.asPolyline()[0] != aLine.asPolyline()[1]):
133135
# sometimes splitting results in lines of zero length
134136
outFeat.setGeometry(aLine)
135137
writer.addFeature(outFeat)

0 commit comments

Comments
 (0)
Please sign in to comment.