2

I have a DEM of terrain that I have successfully added a raster of woodland to: Terrain & Woodland I am trying to add to that a raster of a built up area, but the extent of the settlement raster is smaller than my terrain/woodland raster: Terrain & Woodland with settlement on top However, when I use raster calculator and add "terrain_woodland@1" + "settlement_raster@1", I get the two added together but my output is cropped to the extent of the settlement raster.

Can anyone tell me what I am doing wrong?

  • 1
    You know you can just change the raster display properties to make different pixel values various degrees of transparent? E.g., set the nan-value of your settlement raster to be fully transparent, and the "on" value to be partially transparent. Maybe you have a reason for adding the rasters, but I can't imagine it. – Jon Feb 28 '19 at 23:20
  • 2
    Raster calculations only work on rasters with the same extents (in your case the calculation is only occurring where the two rasters both have co-occurrence of valid pixels - within the extent of the settlements raster). Change the extent of the settlements rasters before adding them together and it should work fine. – scabecks Feb 28 '19 at 23:31
  • Thanks for both replies - How would I change to extent of the settlement raster so that it is the same size as my DEM raster? I have tried right clicking and saving as and changing the extents to match the DEM but I get very strange results. Is there another way to change the settlement raster extents? – DavidG Mar 1 '19 at 7:24
  • Check this: gis.stackexchange.com/questions/209139/… – henkth Mar 1 '19 at 11:11
  • @David what do you mean by strange results? Adding the rasters together (in the literal sense) is alluded to by henkth and my comments get at, but as mentioned by Jon, in this case there probably isn't any reason to do that. For example, adding a DEM and woodland areas (assuming that raster is 0 and 1 - woodland/not-woodland) simply adds 1 to the DEM value. Adding in your settlements would do the the same. What is the end goal of what you're trying to do with the map or analysis? – scabecks Mar 5 '19 at 2:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.