Skip to content

Commit ffae112

Browse files
Bernhard Ströblm-kuhn
Bernhard Ströbl
authored andcommitted
[BUG] Do not output lines shorter than 0.00001
1 parent bbcacfb commit ffae112

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

+6-2
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,13 @@ def processAlgorithm(self, progress):
128128

129129
inLines = outLines
130130

131+
131132
for aLine in inLines:
132-
outFeat.setGeometry(aLine)
133-
writer.addFeature(outFeat)
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
136+
outFeat.setGeometry(aLine)
137+
writer.addFeature(outFeat)
134138

135139
progress.setPercentage(int(current * total))
136140

0 commit comments

Comments
 (0)