Alias for match_points_to_graph

match_points_to_graph(verts, xy, connected = FALSE)

## Arguments

verts |
A `data.frame` of vertices obtained from
`dodgr_vertices(graph)` . |

xy |
coordinates of points to be matched to the vertices, either as
matrix or sf-formatted `data.frame` . |

connected |
Should points be matched to the same (largest) connected
component of graph? If `FALSE` and these points are to be used for a
`dodgr` routine routine (dodgr_dists, dodgr_paths, or
dodgr_flows_aggregate), then results may not be returned if points are
not part of the same connected component. On the other hand, forcing them to
be part of the same connected component may decrease the spatial accuracy of
matching. |

## Value

A vector index into verts

## Examples

#> [1] 1357 1722 540 455 482 536 473 578 758 521

pts <- verts$id [pts]
pts # names of those vertices

#> [1] "1376768709" "2588155742" "677638828" "1161117434" "1691495982"
#> [6] "677638825" "1376769146" "3544918710" "1388482047" "1691496086"