jmlondon / pathroutr

R package for routing tracks around barrier polygons
https://jmlondon.github.io/pathroutr/
16 stars 2 forks source link

check for NA values w/in prt_nearestnode() #3

Closed jmlondon closed 3 years ago

jmlondon commented 3 years ago

If the maxdist value is not large enough, stplanr::find_nearest_nodes() will return NA. Need add a check for this and, then, offer a suggestion that user increase value for maxdist.

Probably also worth exploring optimal maxdist values so the default is sensible

jmlondon commented 3 years ago

This was addressed in ae11412; there is no longer a maxdist value needed with the swich to nabor::knn(). should still add some checks in case knn() fails.