Merge lines in direction error
Merge lines in direction produces this rather incomprehensible error if there is a line that starts and ends at the same point:
Calculating feature informations...
Merging lines...
Saving output...
Traceback (most recent call last):
File "C:\Users/alister/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\lftools\processing_provider\Vect_DirectionalMerge.py", line 334, in processAlgorithm
fet.setGeometry(QgsGeometry.fromPolylineXY(item[0]))
TypeError: index 0 has type 'float' but 'QgsPointXY' is expected
Execution failed after 0.01 seconds
"Lines to Polygon" also produces an error if there is a line that starts and ends at the same point. I note that the "native" (built in) QGIS "lines to polygons" algorithm doesn't error in this case.
I fixed "Lines to Polygon" tool, but I didn't find the problem with "Merge lines in direction". Could you send some example as shapefile or geopackage?
Ah, yes, it seems it doesn't error with every "line that starts and ends at the same point". But here is an example. example9.zip
I note also that it generally doesn't join lines which would form (or already are) a feature with two vertexes at the same point (except if it is the start and end points). Here is a file to demonstrate. example2.zip