1

I'm trying to clip out part of a raster (DEM), change the values within the clipped raster and then merge/join the edited raster back into the original. The context is that I have a high resolution DEM (50 cm) representing a hill and want to show the final shape of the hill after proposed earthworks have taken place (the removal of three metres of soil in a given area).

I've followed this process:

  • Extract by Mask (polygon representing proposed earthworks location)
  • Create edited raster of earthworks area by reassigning values of clipped raster ('clipped_raster - 3')
  • Used raster calculator as follows: enter image description here

The output I'm getting is limited to the clipped raster, I'm losing the extent of the original raster.

1

I think the calculator defaults to the extent of the last selected raster (which in your case is your "edited_raster").

Try inputting your formula, and then highlight the original raster in the little table of contents. With it highlighted click "current layer extent" - this should set the output extent to the extent of the original.

enter image description here

  • Thanks very much for your help. I tried selecting the original raster as the current layer extent but I'm still having issues. The original raster has values ranging from 421 - 456 and the output raster I'm getting (which does not display) has values ranging from 1.79769 to -1.79769. From the reading I've done it sounds like this may be related to the differing 'no data' values in the input rasters. I've tried reassigning 'no value' in each of the rasters to -9999 but I'm still having the issue mentioned above. – r_olsen Aug 2 '18 at 1:08
  • I see you have submitted an answer yourself above - if it's solved your issue don't forget to select the little green tick to mark the question answered. – Ed Rollason Aug 3 '18 at 9:45
0

The original raster (actual elevation) and edited raster (elevation minus 3 metres) can be combined using SAGA 'Mosaic Raster Layers'.

The following process produced the desired output:

  • Clip raster to area of interest.
  • Use Raster Calculator to subtract a value of 3 from the clipped raster.

In SAGA 'Mosaic Raster layers' - Input the two rasters and set the 'Overlapping Areas' drop down to 'Minimum' (preferences minimum values for overlapping areas). - Set the 'Cellsize' to match the size of the input raster cells.

This process overwrites the original raster values for the area of interest with the edited values.

Your Answer

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

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