
Last chance! 50% off unlimited learning
Sale ends in
Return SpatialPointsDataFrame with nearest street from OSRM nearest service
nearest2spdf(lat, lng, osrmurl = "http://router.project-osrm.org",
return_sf = FALSE)
Numeric vector containing latitude coordinate for each coordinate to map. Also accepts dataframe with latitude in the first column and longitude in the second column.
Numeric vector containing longitude coordinate for each coordinate to map.
Base URL of the OSRM service
Boolean value if this function should return an sf object, if FALSE returns sp object (default FALSE).
Retrieve coordinates and name of the node(s) on the network mapped from coordinates passed to functions using OSRM API v4 only. For API v5, use nearest_osm.
Other routes: line2routeRetry
,
line2route
,
route_cyclestreet
,
route_dodgr
,
route_graphhopper
,
route_local
, route_osrm
,
route_transportapi_public
,
route
, viaroute2sldf
,
viaroute
# NOT RUN {
nearest2spdf(
lat = c(50.3, 50.2),
lng = c(13.2, 13.1)
)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab