opq_osm_id | R Documentation |
Add a feature specified by OSM ID to an Overpass query
opq_osm_id(id = NULL, type = NULL, open_url = FALSE)
id |
One or more official OSM identifiers (long-form integers), which must be entered as either a character or numeric value (because R does not support long-form integers). |
type |
Type of object; must be either |
open_url |
If |
opq object
Extracting elements by ID requires explicitly specifying the type of element. Only elements of one of the three given types can be extracted in a single query, but the results of multiple types can nevertheless be combined with the c operation of osmdata.
https://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#By_element_id
Other queries:
add_osm_features()
,
add_osm_feature()
,
bbox_to_string()
,
getbb()
,
opq_around()
,
opq_enclosing()
,
opq_string()
,
opq()
,
overpass_status()
## Not run: id <- c (1489221200, 1489221321, 1489221491) dat1 <- opq_osm_id (type = "node", id = id) %>% opq_string () %>% osmdata_sf () dat1$osm_points # the desired nodes id <- c (136190595, 136190596) dat2 <- opq_osm_id (type = "way", id = id) %>% opq_string () %>% osmdata_sf () dat2$osm_lines # the desired ways dat <- c (dat1, dat2) # The node and way data combined ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.