Description Usage Arguments Value Note Examples
View source: R/overpass_query.r
Issue OSM Overpass Query
1 | overpass_query(query, quiet = FALSE, wait = TRUE, pad_wait = 5)
|
query |
OSM Overpass query. Please note that the function is in ALPHA dev stage and needs YOU to specify that the output type is XML. However, you can use Overpass XML or Overpass QL formats. |
quiet |
suppress status messages. OSM Overpass queries may not return quickly. The
package will display status messages by default showing when the query started/completed.
You can disable these messages by setting this value to |
wait |
if |
pad_wait |
if there is a queue and |
If the query result only has OSM nodes then the function
will return a SpatialPointsDataFrame with the nodes.
If the query result has OSM ways then the function
will return a SpatialLinesDataFrame with the ways
relationss are not handled yet.
If you asked for a CSV, you will receive the text response back, suitable for
processing by read.table(text=..., sep=..., header=TRUE, check.names=FALSE,
stringsAsFactors=FALSE).
wrap function with httr::with_verbose if you want to see the httr
query (useful for debugging connection issues).
You can disable progress bars by calling pbapply::pboptions(type="none") in your
code. See pboptions for all the various progress bar settings.
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
only_nodes <- '[out:xml];
node
["highway"="bus_stop"]
["shelter"]
["shelter"!~"no"]
(50.7,7.1,50.8,7.25);
out body;'
pts <- overpass_query(only_nodes)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.