if (FALSE) {
dat <- opq ("hengelo nl") %>%
add_osm_feature (key = "highway") %>%
osmdata_sf ()
bus <- dat$osm_points [which (dat$osm_points$highway == "bus_stop"), ] %>%
rownames () # all OSM IDs of bus stops
osm_lines (dat, bus) # all highways containing bus stops
# All lines which intersect with Piccadilly Circus in London, UK
dat <- opq ("Fitzrovia London") %>%
add_osm_feature (key = "highway") %>%
osmdata_sf ()
i <- which (dat$osm_polygons$name == "Piccadilly Circus")
id <- rownames (dat$osm_polygons [i, ])
osm_lines (dat, id)
}
Run the code above in your browser using DataLab