prt_reroute | R Documentation |
This is a convenience wrapper, and the suggested function, for re-routing a trkpts
series of ordered POINT features around a barrier polygon via vis_graph built with
the prt_visgraph()
function. The output can be used as a starting point for a custom
process to replace the original geometry. Or, provide the output tibble directly to
prt_update_points()
along with trkpts for simply updating in place.
prt_reroute(trkpts, barrier, vis_graph, blend = TRUE)
trkpts |
Simple Feature points ('sf', 'sfc_POINT'/'sfc_MULTIPOINT') that represent track points. Order is accepted as is and the bounding box of trkpts should be within the bounding box of the barrier polygon. |
barrier |
Simple Feature polygon ('sf', 'sfc_POLYGON'/'sfc_MULTIPOLYGON')
representing the barrier feature. Should be the same barrier as supplied to the
|
vis_graph |
sfnetwork from prt_visgraph() |
blend |
boolean whether to blend start/end points into network |
a two-column tibble with column fid representing the row index in trkpts to be replaced by the new geometry in geometry column. If trkpts and barrier do not spatially intersect and empty tibble is returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.