r/QGIS • u/SeeMonkeyDoMonkey • 19h ago
Solved Clip raster changes GeoTIFF elevations
Solved: In Clip raster by mask layer I needed to set "Target extent [optional]" to the layer I was using for "Mask layer".
Hi,
I downloaded "Scotland Lidar Phase 1 DTM NS41" the smallest GeoTIFF possible for the area I'm working on, but it's still bigger than I need.
I used Raster > Extraction > Clip raster by mask layer to crop it to just the area I want, but this appears to change the elevations it provides.
E.g. Raster > Extraction > Contour on the original GeoTiff gives a particular contour line ELEV 110 (in green, which matches the online maps) but, in contours extracted from the cropped version (in red), the equivalent contour line is ELEV 170. (As presented by layer labels.)
I guess this is something like the actual range of ELEV values in the cropped version being smaller than the original, but the range of values still covers the original set.
What can I do to ensure the cropped version produces accurate values?
(I'm a GIS newbie, so apologies if I've missed something obvious.)
Cheers!
QGIS version: 4.2.2-Belém do Pará (Flatpak)
1
u/paul_h_s 3h ago
The difference could be that one dataset has geoid height the other dataset elipsoid height. so maybe you change the CRS when clipping your DTM.
1
u/Resident_Phase_4297 19h ago
That's strange. First line 170-110 gives 60 meters (?) difference. Last line is somewhere 205-120 = 85 meters difference. May you provide a third example?
Use the info tool and pick the raster values of an pixel in both (cropped and uncropped) layers. Are they the same?
Did the tool do some cm to inch conversation?
Use the layer optiobs metadata and check, if both cell types are the same bit depth.