Return an OSM Overpass query as an osmdata object in sp format.
Source:R/get-osmdata-sp.R
osmdata_sp.Rd
Return an OSM Overpass query as an osmdata object in sp format.
Arguments
- q
An object of class
overpass_query
constructed with opq and add_osm_feature. May be be omitted, in which case the osmdata object will not include the query.- doc
If missing,
doc
is obtained by issuing the overpass query,q
, otherwise either the name of a file from which to read data, or an object of class xml2 returned from osmdata_xml.- quiet
suppress status messages.
Value
An object of class osmdata
with the OSM components (points, lines,
and polygons) represented in sp format.
See also
Other extract:
osmdata_data_frame()
,
osmdata_sc()
,
osmdata_sf()
,
osmdata_xml()
Examples
if (FALSE) { # \dontrun{
hampi_sp <- opq ("hampi india") %>%
add_osm_feature (key = "historic", value = "ruins") %>%
osmdata_sp ()
} # }