View source: R/ohsome_boundary.R
ohsome_boundary | R Documentation |
ohsome_boundary
objectCreates an ohsome_boundary
object from various classes of input geometries.
The ohsome_boundary
object is used to set the bpolys
, bboxes
or
bcircles
parameter of an ohsome_query
object.
ohsome_boundary(boundary, ...)
## S3 method for class 'ohsome_boundary'
ohsome_boundary(boundary, ...)
## S3 method for class 'character'
ohsome_boundary(boundary, ...)
## S3 method for class 'sf'
ohsome_boundary(boundary, digits = 6, ...)
## S3 method for class 'sfc'
ohsome_boundary(boundary, ...)
## S3 method for class 'sfg'
ohsome_boundary(boundary, ...)
## S3 method for class 'bbox'
ohsome_boundary(boundary, ...)
## S3 method for class 'matrix'
ohsome_boundary(boundary, ...)
## S3 method for class 'list'
ohsome_boundary(boundary, ...)
boundary |
Bounding geometries specified by WGS84 coordinates in the
order
|
... |
Additional arguments other than |
digits |
integer; number of decimal places of coordinates in the
resulting GeoJSON when converting |
An ohsome_boundary
object which contains the following elements:
boundary
: the boundary in textual format
type
of the boundary (bpolys
, bcircles
, or bboxes
).
# Defintion of a bounding circle (lon,lat,radius in meters)
ohsome_boundary("8.6528,49.3683,1000")
# Definition of two named bounding circles
ohsome_boundary("Circle 1:8.6528,49.3683,1000|Circle 2:8.7294,49.4376,1000")
# Definition of two named bounding circles with a character vector
ohsome_boundary(c("Circle 1:8.6528,49.3683,1000", "Circle 2:8.7294,49.4376,1000"))
# Use franconia from the mapview package as bounding polygons
ohsome_boundary(mapview::franconia, digits = 4)
# Use the bounding box of franconia
ohsome_boundary(sf::st_bbox(mapview::franconia))
# Get bounding box of the city of Berlin from OSM
## Not run:
ohsome_boundary(osmdata::getbb("Berlin"))
## End(Not run)
# Use a list of two bounding boxes
## Not run:
ohsome_boundary(list(osmdata::getbb("Berlin"), sf::st_bbox(mapview::franconia)))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.