Closed kobusburger closed 3 years ago
Is it ok on a previous version of profiletool ?
and could you provide the DEM too ?
Yes. The I see the same problem with version 3.1.8
@kobusburger please share the DEM too
I tested on a DEM I had in stock and a fresh new vector line and profiletool report the correct length
I created a small project (attached) and it still gives the problem. The profile is for more than 240km but the layer length is about 99km (screen capture). The cursor is sometimes also no on the line. I tested it on QGIS 3.16.8 LTR.
Ok got it. If you plot with "Selected polyline" instead of "Selected layer", distance is OK.
When you use "Selected layer", iterate on all feature to extract vertices and append them in a list. So first vertex of feature N+1 is just after last vertex of feature N. And profiletool plot the DEM between all vertices. That's why you see on canvas, the red dot not on your polyline.
Example:
Between fid 36 and 38
And if you connect all vertices using a strait line
So it's not a bug to my opinion, just a bad usage of the plugin.
Sorry for the poor english...
I think I understand. The lines do not follow each other in the attribute table and therefore the profile is created between vertices that do not have a line between them. If I delete the shorter lines which do not follow each other and just retain the long line segments which do follow each other, then the profile is correct.
Can you exclude the the sections that do not follow a line?
I would have to guess which line is the main line, order vertices then draw ?
Or use selected polylines instead of selected layer
The profile generated by version 4.20.0 (obtained via a zip file) covers a much longer distance than the layer. The total line length of the layer is about 99km but the profile tool displays 245km (see image). The red dot following the mouse is also not on the line (see image). The layer (shape format) and profile table (csv) is attached.
Profile.zip
![image](https://user-images.githubusercontent.com/6264060/124513742-c5bce780-dddb-11eb-9da5-927435790e4f.png)