ohsome_query | R Documentation |
ohsome_query
objectCreates an ohsome_query
object specifying the ohsome API endpoint and
the request parameters.
ohsome_query(endpoint, boundary = NULL, grouping = NULL, ..., validate = FALSE)
endpoint |
The path to the
ohsome API endpoint.
Either a single string (e.g. |
boundary |
Bounding geometries specified by WGS84 coordinates in the
order
|
grouping |
character; group type(s) for grouped aggregations (only available for queries to aggregation endpoints). The following group types are available:
Not all of these group types are accepted by all of the aggregation endpoints. Check Grouping for available group types. |
... |
Parameters of the request to the ohsome API endpoint. |
validate |
logical; if |
An ohsome_query
object. The object can be sent to the ohsome API
with ohsome_post()
. It consists of the following elements:
url
: The URL of the endpoint.
encode
: The way the information is encoded and then posted to the
ohsome API. Set as "form"
.
body
: The parameters of the query such as format
, filter
or
bpolys
.
# Extract building geometries with manually set bboxes parameter
ohsome_query(
"elements/geometry",
bboxes = "8.6,49.36,8.75,49.44",
time = "2022-01-01",
filter = "building=*"
)
# Extract building geometries using a boundary object:
ohsome_query(
"elements/geometry",
boundary = "8.6,49.36,8.75,49.44",
time = "2022-01-01",
filter = "building=*"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.