Replies: 2 comments
-
are you using Assuming your park polygon is a I'm not sure how to answer the second part; I guess my question would be: if you supply multiple origin locations (your entire park) and no destination, what would you want or expect the result to look like:
|
Beta Was this translation helpful? Give feedback.
-
@andrewmarx, |
Beta Was this translation helpful? Give feedback.
-
Hi Andrew & SAMC community!
I love the package, and I've been using a lot lately!
So, I've been working with samc's
visitation
in an application to map connectivity between two discrete locations, and I've run into persistent issues when attempting to set an origin location. In my application, I'm trying to model bi-directional visitation between two polygons (the first being a national park's boundary, and the second a small national wildlife refuge nearby). When attempting to set the national park as an origin, I've tried to supply cell numbers for all the pixels inside the park boundary but I always get the same error:I've double-checked (a million times) that each cell I've attempted to pass to the
origin
argument insamc::visitation
is non-NA, doing so by checking the corresponding value from the raster layer, and despite all points being non-NA the error is still thrown.In fact, the only way I can successfully set an origin location is by taking a single random point from the center of the park boundary and then passing it to
samc::locate
. However, I can only escape the above error by setting a specific seed for the random 1-point sample, otherwise the same error is thrown. Ideally, I would like to set every pixel within the park boundary as an origin, but I believe this is only achievable when a destination is also set. In my case, I've set the anticipated destination as the only non-zero absorption cells. Should I also set this to thedest
argument in the function?More generally, do you have any recommendations for "best practices" when setting origins and destinations in
samc::visitation
?Thanks,
-Alex.
Beta Was this translation helpful? Give feedback.
All reactions