[GRASS-user] Raster grow within area boundaries
Stefan.Blumentrath at nina.no
Fri Oct 19 07:11:25 PDT 2018
You could use r.cost with a cost map where all data outside area boundaries is NULL and rest is 1 (or resolution)…
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
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,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the grass-user