qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.39k stars 2.98k forks source link

Elevation profile: raster profile rendering misbehaves #50258

Open wonder-sk opened 2 years ago

wonder-sk commented 2 years ago

What is the bug or the crash?

Rendering of profiles of raster DEMs sometimes does not work correctly - observable mainly when zoomed in to the point where profile spans across just few pixels of the DEM:

Both issues demonstrated here:

https://user-images.githubusercontent.com/193367/191254488-cef337ad-4b6a-40ef-9b9a-66faced37a86.mp4

Steps to reproduce the issue

  1. open a raster DEM + mark it as an elevation surface in layer properties
  2. open profile tool and draw a line
  3. zoom into the profile so that only few pixels of the raster are visible
  4. observe the erratic behavior described above

Versions

QGIS master

Supported QGIS version

New profile

Additional context

No response

AlisterH commented 1 year ago

The profile never seems quite right to me. Zoom in and compare values in the profile with values shown in the Value Tool, or measure distances in the map and compare with distances in the profile. In this screenshot 2.2m measured on the map somehow equals 1.7m on the profile: image

AlisterH commented 1 year ago

Sorry, my cursor disappeared when I took the screen snip. I was measuring from the left end of the profile line in the map to the closest edge of the first pixel with elevation=12.

AlisterH commented 9 months ago

Possibly related to this: Zoom in on a profile until you get a clearly "stepped" view. image Toggle a layer off. image Toggle it back on again. image Pan with the middle mouse button. image

AlisterH commented 9 months ago

Also, when toggling layers on and off in the profile QGIS sometimes gets very confused:

https://github.com/qgis/QGIS/assets/714600/249e1339-210e-4cc3-82b9-9e14a11ae079

https://github.com/qgis/QGIS/assets/714600/21f17ce8-fe13-4088-ad9a-a2620ae87719