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.65k stars 3.01k forks source link

Elevation profile with raster DEM appears shifted #58236

Open Djedouas opened 4 months ago

Djedouas commented 4 months ago

What is the bug or the crash?

The elevation profile is wrong, as if the raster layer was shifted by 1/2 pixel in X & Y.

We can see here that we capture the centroids with the same Z value as the DEM pixel, the centroids are correctly placed in the elevation profile graphic, but the DEM line is not.

Examples are with a 25x25m pixel DEM.

image

Expected profile:

image

Another observation: sometimes, the DEM elevation profile is like "filled" with the pixel value

image

Steps to reproduce the issue

  1. In DEM raster layer, check elevation surface representation
  2. Create a PointZ layer to have references (raster pixels to points and set Z value processings)
  3. Create a profile measurement with a tolerance to allow capturing the points

Sample project to reproduce

Sample project and data inside GPKG : dem_elevation_profile.zip

Versions

QGIS 3.34.9 LTR

QGIS master https://github.com/qgis/QGIS/commit/623ceab11d8

Supported QGIS version

New profile

Additional context

No response

nicolas-forquet commented 1 month ago

I'm facing the same issue. Can anyone look at this issue please?