Skip to content

Using gdistance to compute a least cost path which avoids certain cells entirely, no matter the distance

2 messages · sharx, Facundo Muñoz

#
Hi Jacob,

Thank you for the quick response! In the example where we want the animal
to "go ten times as far to avoid crossing a road", would the non-road cells
be assigned a resistance of 0? Or a resistance of 1?

If I know that the animal only has enough to time to travel, say, 5000
meters from one point to the next, is it correct to assign road cell
resistance 5000 (given units in meters) and non-road cells a resistance of
1? By taking into account the 30 m raster cell size, do you mean we should
multiply 5000 by 30 for the road resistance?

Again, thank you so much for your help!

Best,
Sharon

On Tue, Apr 28, 2015 at 8:25 AM, R-sig-geo mailing list [via R-sig-geo] <
ml-node+s2731867n7588123h51 at n2.nabble.com> wrote:

            
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Using-gdistance-to-compute-a-least-cost-path-which-avoids-certain-cells-entirely-no-matter-the-distae-tp7588118p7588150.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
#
Hi Sharon,

note that if the road is "thin" (i.e. it takes only one or two pixels
wide), and if you use the function "mean" when creating the transition
layer, then it will always be possible to cross the roads.

I faced a similar problem, where I wanted to model an absolute barrier
(impossible to cross), and found it more convenient to work with
permeability rasters (rather than cost). So I can define permeability =
0 for barriers (i.e. infinte cost). Moreover, I defined a transition
function that returns the mean when both cells have non-zero values, but
returns zero if not.

?acu.-


El 01/05/2015 a las 17:08, sharx escribi?: