ohsome_post {ohsome} | R Documentation |
Send POST request to ohsome API
Description
Sends an ohsome_query
object as a POST request to the ohsome API and
returns the response.
Usage
ohsome_post(
query,
parse = TRUE,
validate = TRUE,
strict = validate,
additional_identifiers = NULL,
...
)
Arguments
query |
An |
parse |
logical; if |
validate |
logical; if |
strict |
logical; If |
additional_identifiers |
vector coercible to character; optional user
agent identifiers in addition to |
... |
Additional arguments passed to
|
Value
An ohsome_response
object if parse = FALSE
, else an sf
object,
a data.frame
, a list
or a character
See Also
Examples
## Not run:
# Get bounding box of the city of Berlin
bbberlin <- osmdata::getbb("Berlin")
# Query for cinema geometries within bounding box
q <- ohsome_elements_geometry(bbberlin, filter = "amenity=cinema")
# Send query to ohsome API and return sf by default
ohsome_post(q)
# Send query to ohsome API and return data.frame
ohsome_post(q, returnclass = "data.frame")
# Send query and return unparsed response
ohsome_post(q, parse = FALSE)
## End(Not run)