[GRASS-user] Raster grow within area boundaries

Stefan Blumentrath Stefan.Blumentrath at nina.no
Fri Oct 19 07:11:25 PDT 2018


Hi Michael,

You could use r.cost with a cost map where all data outside area boundaries is NULL and rest is 1 (or resolution)…
https://grass.osgeo.org/grass76/manuals/r.cost.html

Cheers
Stefan

From: grass-user <grass-user-bounces at lists.osgeo.org> On Behalf Of Michel Wortmann
Sent: fredag 19. oktober 2018 15:48
To: GRASS user list <grass-user at lists.osgeo.org>
Subject: [GRASS-user] Raster grow within area boundaries

Hi team,
I would like to grow the value of some pixels (e.g. streams) but only within irregular areas (e.g. subbasins), i.e. values of should not grow beyond the area boundary (as r.grow.distance would do). I could loop over each area, mask it and use r.grow.distance and then patch it all together. But that is time consuming with several thousand areas. Does anyone have a better idea how to achieve this?

E.g. (the boundaries argument doesn’t exist):

r.grow.distance input=stream value=streams_grown boundaries=subbasins

Thanks a lot,
Michel


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20181019/bb70bfb5/attachment.html>


More information about the grass-user mailing list