Last active
March 23, 2022 15:06
-
-
Save mthh/3a05047ca29b35d9938824ebf4fff219 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(osmdata) | |
my_opq <- opq(bbox = bb) # Ou bb est la bbox souhaitée | |
# Tous les trucs "verts" (forêts, pelouses, parcs, vignes, etc.) | |
green1 <- my_opq %>% | |
add_osm_feature(key = "landuse", value = c("allotments", | |
"farmland","cemetery", | |
"forest", "grass", "greenfield", | |
"meadow", | |
"orchard", "recreation_ground", | |
"village_green", "vineyard")) %>% | |
osmdata_sf() | |
green3 <- my_opq %>% | |
add_osm_feature(key = "leisure", value = c("garden", "golf_course", | |
"nature_reserve", "park", "pitch")) %>% | |
osmdata_sf() | |
green4 <- my_opq %>% | |
add_osm_feature(key = "natural", value = c("wood", "scrub", "health", | |
"grassland", "wetland")) %>% | |
osmdata_sf() | |
green5 <- my_opq %>% | |
add_osm_feature(key = "tourism", value = c("camp_site")) %>% | |
osmdata_sf() | |
# Route | |
q4 <- osmdata_sf(add_osm_feature(my_opq, key = 'highway', value = '', value_exact = FALSE)) | |
# Rail | |
q5 <- osmdata_sf(add_osm_feature(my_opq, key = 'railway', value = '', value_exact = FALSE)) | |
# Surface d'eau (dont cours d'eau) | |
blue <- my_opq %>% | |
add_osm_feature(key = "natural", value = c("water")) %>% | |
osmdata_sf() | |
# Gare de grenoble | |
railstation <- my_opq %>% | |
add_osm_feature(key = "railway", value = c("station")) %>% | |
add_osm_feature(key = "name", value = c("Grenoble")) %>% | |
osmdata_sf() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment