This question has been asked here multiple times. And every time, it seems that the people offering answers don't understand the magnitude of what's happening. When I reproject a DEM raster with this histogram (distribution of raster values):
I get a raster with this histogram (distribution of raster values):
This is a global reduction in values across the raster of about 6-7%. And this happens whether I use Bilinear interpolation (the most appropriate thing for a DEM) or Nearest Neighbor (no interpolation at all; all values match some original point).
It's to be expected that my values will be approximate. It's to be expected that unless I use Nearest Neighbor, all the values will be new. But it's not to be expected that the entire range of values is different. This is not interpolation. Something is wrong, and there has to be a switch or bug somewhere that is causing scaling of some sort or just a mistake.
Now, to clarify further, a contour map (since this is a DEM) of the results looks great unless you label its elevations. But a color ramp of course doesn't look so great since one is much higher than the other. In other words, the relative values, or their interpolation on reprojection, is fine. What's wrong is that the whole set uniformly is either offset or scaled. I checked opposite horizontal and value extremes of my original and results rasters, and the value difference was the same between them. So I think it appears that they are uniformly or almost uniformly being offset.
Here are my steps:
- With QGIS Version 3.28.8-Firenze, I added a 1-meter DEM raster layer that I downloaded from USGS The National Map Downloader (size 10,424 KB).
The metadata for the DEM include the following:
- Project Name: AZ_MaricopaPinal_2020_B20
- Horizontal EPSG Code: 6341 (NAD83(2011) / UTM zone 12N)
- Vertical EPSG Code: 5703 (NAVD88 height in meters)
- Geoid Model: GEOID 18
My project is on
- Horizontal EPSG Code 2223 (NAD 83 Arizona Central)
- Vertical EPSG Code 5703
- I used QGIS Raster, Projections, Warp (Reproject) to reproject to EPSG:2223. I did not set the Source CRS, and this was the cause of the problem. Maybe the source defaulted to WGS84.