<div dir="ltr"><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">Hi,</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">Given a binary land/sea raster, I’m trying to calculate the shortest distance from each land cell to the sea within a range of wind directions (e.g. 85-95 degrees from north). The calculation is basically r.grow.distance with an extra parameter for the range of directions <span style="font-size:13.1999998092651px;line-height:19.7999992370605px">(or a raster of the input bearings at each cell) </span><span style="font-size:13.1999998092651px;line-height:19.7999992370605px">with which to restrict the spreading function. </span></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">I’d appreciated any advice on how to to implement something like this in <span class="kc">GRASS</span>. </div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">I have an implementation in R that draws a line from each cell along the given bearing and finds the length of the segment that intersects with a land polygon (vectorized from the land/sea raster). This is slow for larger rasters and doesn't apply to a range of directions, so it looks like something closer to r.grow.distance is the way to go.</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">Thanks for any suggestions,</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px">Nick</div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><br></div><div style="font-size:13.1999998092651px;line-height:19.7999992370605px"><b style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;line-height:normal">Nicolas E. Gauthier</b><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;line-height:normal">Graduate Research Assistant, Center for Social Dynamics and Complexity</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;line-height:normal">School of Human Evolution and Social Change</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;line-height:normal">Arizona State University</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;line-height:normal"><a href="mailto:Nicolas.Gauthier@asu.edu" target="_blank" style="color:rgb(17,85,204)">Nicolas.Gauthier@asu.edu</a></div></div></div>