Description Usage Arguments Value See Also Examples
Downloads OSM XML objects and converts to sp
objects
(SpatialPointsDataFrame
, SpatialLinesDataFrame
, or
SpatialPolygonsDataFrame
).
1 2 3 4 5 6 7 8 9 10 | extract_osm_objects(
bbox,
key,
value,
extra_pairs,
return_type,
sf = TRUE,
geom_only = FALSE,
quiet = FALSE
)
|
bbox |
the bounding box within which all key-value objects should be downloaded. A 2-by-2 matrix of 4 elements with columns of min and max values, and rows of x and y values. |
key |
OSM key to search for. Useful keys include |
value |
OSM value to match to key. If |
extra_pairs |
A list of additional |
return_type |
If specified, force return of spatial ( |
sf |
If |
geom_only |
If |
quiet |
If |
Either a SpatialPointsDataFrame
, SpatialLinesDataFrame
,
or SpatialPolygonsDataFrame
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
bbox <- get_bbox (c(-0.13,51.50,-0.11,51.52))
dat_B <- extract_osm_objects (key = 'building', bbox = bbox)
dat_H <- extract_osm_objects (key = 'highway', bbox = bbox)
dat_BR <- extract_osm_objects (key = 'building',
value = 'residential',
bbox = bbox)
dat_HP <- extract_osm_objects (key = 'highway',
value = 'primary',
bbox = bbox)
dat_HNP <- extract_osm_objects (key = 'highway',
value = '!primary',
bbox = bbox)
extra_pairs <- c ('name', 'Royal.Festival.Hall')
dat <- extract_osm_objects (key = 'building', extra_pairs = extra_pairs,
bbox = bbox)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.