I am querying the Overpass API using osmdata
in R, searching for all ways where bicycle = yes
and would like to exclude ferry routes.
Below is my code so far and a picture of the map result. As you can see there in the map there is a protruding line representing the ferry route.
I've tried a few variations of add_osm_feature("route", != "ferry")
but can't seem to get it working.
Is it possible to exclude ferry routes at all?
query_1 <- getbb("Copenhagen Municipality, Denmark") %>%
opq() %>%
add_osm_feature("bicycle", "yes")
query_1_sf <- osmdata_sf(query_1)
###mapping
map <- get_map(getbb("Copenhagen"), maptype = "toner-background")
ggmap(map)+
geom_sf(data = query_1_sf$osm_lines,
inherit.aes = FALSE,
colour = "#238443",
size = .5)+
labs(x = "", y = "")