1

I have two rasters and I want to subtract the values from one of the layers.
The first raster is a altitude raster and the second raster is depth values for a lake. I would like to subtract the depth values to get the altitude of the bedrock under the lake. When I do this in the raster calculator (raster 1 - raster 2) the resulting raster is all wrong and have extreme negative values (-1,7 x10^35). It has been pointed out to me that the "no data" values for one of the rasters are within the size of my negative output.

How do I change the "no data" values to get the result I'm after?

  • Did you try your subtraction "by hand" on a few pixels, to compare with the raster calculator results? And can you put in your question the exact formula you used? – ArMoraer Jan 28 '16 at 13:32
  • 2
    are the areas outside your lake set to a NODATA value (say -1.7e35)? – Ian Turton Jan 28 '16 at 13:35
  • iant: How do I see if that is the case? When the rasters was cut they came out a little bit different. Is there a way to cut them so that the cells get exactly the same? – Lark Jan 28 '16 at 13:55
  • @Lark - look at the statistics of the raster in the properties window – Ian Turton Jan 28 '16 at 15:20
  • @iant - there is no data below 1100 m in the histogram. – Lark Jan 28 '16 at 15:48

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.