if (FALSE) {
q <- getbb ("Catalan Countries", format_out = "osm_type_id") |>
opq (out = "tags center", osm_type = "relation", timeout = 100) |>
add_osm_feature ("admin_level", "7") |>
add_osm_feature ("boundary", "administrative") |>
opq_csv (fields = c ("name", "::type", "::id", "::lat", "::lon"))
comarques <- osmdata_data_frame (q) # without timeout parameter, 0 rows
qid <- opq_osm_id (
type = "relation",
id = c ("341530", "1809102", "1664395", "343124"),
out = "tags"
) |>
opq_csv (fields = c ("name", "name:ca"))
cities <- osmdata_data_frame (qid)
}
Run the code above in your browser using DataLab