2

I'm trying to combine two rasters to create a more accurate DEM for some viewshed analysis I need to run- I've got a raster showing building heights and I've got a DTM raster (sourced from OS data). I need to add the values of the building heights to the DTM so that the final results appear with the height of the ground PLUS the height of the buildings.

I've tried the raster calculator, and also the SAGA mosaick tool but neither is producing what I need. What can I do?

2 Answers 2

4

Without seeing your data nor your outputs I would suspect that the elevation values in your build heights raster have no data values between the building footprints. Unless otherwise declared, a raster operation with a no data cell will return no data. You can confirm this in that if you added your two rasters together the result looks like the building heights raster. You could improve your post - edit to show what you have and what you are getting.

Still, I suspect the tool you want is called Highest Position in Raster Stack This tool is available in the Raster Analysis section of the Processing Toolbox. This tool has an option to ignore no data values so you likely need to have that checked.

3

I supposed that the buildings raster has a lot of NULL value. You first need to convert null value to 0. Then in raster calculator:

IF(buildings@1>0, buildings@1+DTM@1, DTM@1)

Be careful, if you want to do a viewshed, the resolution of the 2 rasters should be the same… otherwise, you’ll have artefacts! So convert the buildings raster if needed!

1
  • That's it! Thank you :)
    – Phoebe
    Commented Mar 20, 2023 at 8:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.