Intended result
I have a layer that contains as features individual lines of varying lengths and seek to construct a layer that contains 100 equally-spaced elevation values over the length of the line to construct a cross profile for each of the lines (the output of the saga:crossprofiles
processing algorithm).
Problem
I manage to run the saga:crossprofiles
algorithm but the output layer seems to contain multiple rows for a single line (feature) in the input layer. My first thought was that, since the line features are of varying length, the spacing between the cross-profile samples might be too short and additional rows might be created to account for it. Therefore, I figured that it might help to make sure the features are in descending order of line length. I already tried that but unfortunately to no avail.
I run the following code to create the cross profiles layer:
params = { 'DEM' : '<elevation raster layer file path>',
'DIST_LINE' : 10,
'DIST_PROFILE' : 10,
'LINES' : 'file:///<CSV file path>?crs=epsg:3857&delimiter=;&wktField=line_WKT',
'NUM_PROFILE' : 100,
'PROFILES' : 'TEMPORARY_OUTPUT' }
cross_profiles = processing.runAndLoadResults("saga:crossprofiles", params)
The following is a screenshot of the created cross profile layer's attribute table that shows that there are multiple rows created for a single line (feature) in the input layer:
I run the long-term release QGIS 3.10 on Windows.