jmlondon / pathroutr

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

pathroutr vignette "Re-routing Straight Line Paths Around Barriers - A Visibility Graph Demo" failing #9

Closed jmlondon closed 3 years ago

jmlondon commented 3 years ago

This was brought to my attention by @dsjohnson . The vignette fails with

_Error: Problem with mutate() column start_pt. ℹ start_pt = trkpts[start_idx, ] %>% sf::st_geometry(). x incorrect number of dimensions ℹ The error occurred in row 1. Run rlang::last_error() to see where the error occurred._

This issue here is that get_barrier_segments() now seems to only work with features of class sf. _sfcPOINT and _sfcMULTIPOINT no longer work. Something must have changed in {sf} package that I missed. Will need to dive in a bit more and come up with a better solution.

For now, consider trkpts to be only functional if of class sf