[GRASS-user] How to find elevation drop for all cells in a basin

Ken Mankoff mankoff at gmail.com
Tue Dec 15 12:52:46 PST 2020


On 2020-12-15 at 12:28 -08, Thomas Adams <tea3rd at gmail.com> wrote...
> So, if I understand, that seems pretty simple and could be done with
> r.mapcalc:
>
> diff = elev - outlet_elev
>
> where elev is a raster map of elevations and outlet_elev is the elevation
> at the basin outlet. Using a basin mask the calculation could be confined
> to any basin of interest. But, I am probably missing something, I think…

One of us is missing something, but I'm happy to assume it is me :).

If outlet_elev is only defined at the outlets, diff is only defined at the outlets. I want it defined for every inland cell in every basin. I have 1,000s of basins.

How do I define outlet_elev everywhere? I can do it now using r.stream.distance but prior to Anna suggesting that, I didn't know how to do it. Is there some trick like for each basin I set the category to the elevation of the outlet, and then use mapcalc @math function to create the outlet_elev raster? 

  -k.


More information about the grass-user mailing list