I got to DEM layers over the same area with positive and negative values in them. So I ran a raster calculator raster1-raster2. Now the raster got values with 0,000659 (This should be counted as 0,00, I just want 2 decimals) and so on. I would just like to display values that are bigger or smaller than 0,00 either by symbology or by doing a new calcuation and extracting all values that are not equal to 0,00.

Using Qgis

  • Did you try using a round() function in your computations? – s.k Feb 14 at 11:50

Let's say your DEM layers have the names DEM1 and DEM2. The following expression (in the QGIS Raster Calculator) returns 0 for the differences that have an absolute value that is less than 0.005, and the calculated difference larger absolute differences:

"DEM1@1" - "DEM1@1" * (("DEM1@1" - "DEM1@1" > 0.005) OR ("DEM1@1" - "DEM1@1" < -0.005))

  • 1
    This workt perfect. Thank you! – Linkinpark Feb 18 at 13:36

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.