Skip to contents

It implements the query

Usage

get_bus_routes(
  place,
  query = "SELECT * FROM multilinestrings WHERE route == 'bus'",
  extra_tags = "route",
  ...
)

Arguments

place

A place name or a bounding box passed to osmextract::oe_get()

query

A query to be passed to osmextract::oe_get()

extra_tags

A vector of extra tags to be included in the OSM extract

...

Additional arguments passed to osmextract::oe_get()

Value

An sf object with the bus routes

Details

[out:json][timeout:25];
relation["route"="bus"]({{bbox}});
out geom;

See overpass-turbo.eu for an example of the query in action.

Examples

# r = get_bus_routes("Edinburgh")
# r = get_bus_routes("Isle of Wight")
# plot(r["osm_id"])