Thank you Moritz, I was (stupidly) trying to use v.select instead of v.overlay, and was wondering why v.select was not doing what I wanted... ugh. v.overlay give me precisely what I need!
Thank you, Tom On Sun, May 20, 2018 at 9:59 AM, Moritz Lennert < [email protected]> wrote: > Le Sun, 20 May 2018 09:22:44 -0400, > Thomas Adams <[email protected]> a écrit : > > > Hi all, > > > > I've calculated RUSLE over a large region. I want to to mask > > individual watershed areas (which I can do, no problem here) but > > then, over a buffered path (so, a strip) crossing the watershed, I > > want to calculate the average RULSE value. This is something like > > double masking an area. > > > > Any suggestions how to take the second step? Ideally, I would like to > > be able to intersect the watershed boundary with the vector path and > > use the intersected region as the mask, but I can't figure out how to > > get the intersected region between the vector path and the eatershed > > boundary. > > > > You can go either the vector way, or the raster way. > > (untested) > > Vector: > > r.to.vect -tv watershed out=watershed type=area > v.overlay ain=path bin=watershed out=double_mask > r.mask vector=double_mask > > Raster: > > v.to.rast path out=path use=val > r.mapcalc "doublemask = if(isnull(path) || isnull(watershed), null(), > 1)" > r.mask raster=doublemask > > > Other means exist to replace the r.mapcalc call (e.g. r.cross). Up to > you to test what is easiest/most efficient for you. > > Moritz > --
_______________________________________________ grass-user mailing list [email protected] https://lists.osgeo.org/mailman/listinfo/grass-user
