Quantcast
Channel: Active questions tagged raster-calculator - Geographic Information Systems Stack Exchange
Viewing all articles
Browse latest Browse all 188

Using nested conditional statements in QGIS Raster Calculator

$
0
0

I'm currently working on a project in QGIS and have encountered an issue with formulating a nested conditional statement in the Raster Calculator.

How do I resolve this?

My goal is to perform a raster calculation that prioritizes data from three different raster layers ("National_rp@1", "District@1", and "Water@1"), and uses slope data from a fourth raster ("Slope_rw_rp@1") only if all three of the other raster layers have null values for a particular cell.

I have tried:

if(isnull("National_rp@1") AND isnull("District@1") AND isnull("Water@1"),    6 * 2.71828 ^ (-3.5 * abs("Slope_rw_rp@1" + 0.05)),    if("National_rp@1" = 1, 90,       if("National_rp@1" = 2, 50,          if("District@1" = 1, 70,             if("District@1" = 2, 30,                if("Water@1" = 1, 9999999, 0)            )         )      )   ))

But I get a generic Raster calculation error.


Viewing all articles
Browse latest Browse all 188

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>