osmdata_data_frame {osmdata} | R Documentation |
Return an OSM Overpass query as a data.frame object.
Description
Return an OSM Overpass query as a data.frame object.
Usage
osmdata_data_frame(q, doc, quiet = TRUE, stringsAsFactors = FALSE)
Arguments
q |
An object of class |
doc |
If missing, |
quiet |
suppress status messages. |
stringsAsFactors |
Should character strings in the 'data.frame' be coerced to factors? |
Details
If you are not interested in the geometries of the results, it's a
good option to query for objects that match the features only and forget
about members of the ways and relations. You can achieve this by passing
the parameter body = "tags"
to opq
.
Value
A data.frame
with id, type and tags of the the objects from the
query.
See Also
Other extract:
osmdata_sc()
,
osmdata_sf()
,
osmdata_sp()
,
osmdata_xml()
Examples
## Not run:
hampi_df <- opq ("hampi india") %>%
add_osm_feature (key = "historic", value = "ruins") %>%
osmdata_data_frame ()
attr (hampi_df, "bbox")
attr (hampi_df, "overpass_call")
attr (hampi_df, "meta")
## End(Not run)