Skip to content

Commit 0c719d6

Browse files
Bernhard Ströblm-kuhn
Bernhard Ströbl
authored andcommitted
[BUG] Do not output lines with two identical points
1 parent e3a2a1e commit 0c719d6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ def processAlgorithm(self, progress):
130130

131131

132132
for aLine in inLines:
133-
if round(aLine.length(), 6) > 0:
134-
# sometimes splitting results in lines of almost zero lenght,
135-
# we filter out anything with a lenght of less than 0.00001
133+
if len(aLine.asPolyline()) > 2 or aLine.asPolyline()[0] != aLine.asPolyline()[1]:
134+
# sometimes splitting results in lines of zero length
136135
outFeat.setGeometry(aLine)
137136
writer.addFeature(outFeat)
138137

0 commit comments

Comments
 (0)