if (FALSE) {
query <- opq ("colchester uk") |>
add_osm_feature (key = "highway")
# Then extract data from 'Overpass' API
dat <- osmdata_sf (query)
# colchester has lots of roundabouts, and these are stored in 'osm_polygons'
# rather than 'osm_lines'. The former can be merged with the latter by:
dat2 <- osm_poly2line (dat)
}
# 'dat2' will have more lines than 'dat', but the same number of polygons
# (they are left unchanged.)
Run the code above in your browser using DataLab