[Qgis-user] Spikes in Profile Elevation with adjacent polygons of different heights

Luigi Raffaele Sapone studioingsapone at live.com
Sat Aug 10 07:35:35 PDT 2024


Dear list
 I’m playing with QGIS Elevation Profile
 When I trace the elevation profile of a polygonal layer, in which there are several adjacent polygons of different heights, at the point where there is a variation in height between one polygon and the adjacent one, the module sometimes generates spikes due to (I think) the evaluation of the heights in two points of almost identical coordinates.
For example, if I draw the elevation profile along a segment lying on the X axis (from x=0 to x=10) and passing through two polygons that change elevation (from a height of 100 to a height of 200) at the segment abscissa equal to 5, the output of the elevation module could appear as follows:
 (distance, elevation)
0,100
1, 100
2, 100
3, 100
4, 100
5.00000001,200
5.00000002,100
6,200
7,200
8,200
9,200
10,200
 In other words, at the point (of abscissa approximately = 5) where there is a change in height (from 100 to 200), a spike occurs where, after showing the new height equal to 200 (ad x=5.00000001), the old height equal to 100 (at the next point x=5.00000002) is represented. Then, we have the new height of 200 at x=6, and so on.
 Perhaps, the extremely small difference between the point abscissa of 5.00000001, and the point abscissa of 5.00000002, is not appreciated by the sorting algorithm (based on the distance from the initial point of the segment), which sees them as two equal points, and, arbitrarily, chooses which one to indicate first.
 Thanks
 Regards
Luigi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20240810/1723eacd/attachment.htm>


More information about the QGIS-User mailing list