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

Assign a value to a cell based on the elevation difference with its neighbouring cells

$
0
0

QGIS newbie here. I have a DTM raster layer and a river raster layer that shows location of rivers. I would like to first check if cell X is a river. If yes, check if any of its 8 neighbouring cells is also a river. If yes, check if the difference in elevation between cell X and any of those neighbouring cells that are a river is > 10 m. Assign 1 if true, 0 if false.

The closest Q&A I found was Cell calculations; QGIS,GRASS,GDAL,SAGA, but I don't believe that answers my question.

Using ChatGPT I was able identify which river cells have a > 10 m elevation difference with any of their neighbouring cells (using r.neighbors). What I need now is to turn true only if any of those neighbouring cells are a river.


Viewing all articles
Browse latest Browse all 223

Trending Articles



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