mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-05 00:04:40 -05:00
[BUG] make sure that result line consists of two nodes
This commit is contained in:
parent
97b0375804
commit
e02d36f830
@ -129,7 +129,9 @@ class SplitLinesWithLines(GeoAlgorithm):
|
|||||||
inLines = outLines
|
inLines = outLines
|
||||||
|
|
||||||
for aLine in inLines:
|
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
|
# sometimes splitting results in lines of zero length
|
||||||
outFeat.setGeometry(aLine)
|
outFeat.setGeometry(aLine)
|
||||||
writer.addFeature(outFeat)
|
writer.addFeature(outFeat)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user