get_osm_surround: Function to get points, lines, or polygons from OpenStreetMap...

Description Usage Arguments Value Author(s) Examples

View source: R/get_osm_surround.R

Description

Function to get points, lines, or polygons from OpenStreetMap using ra.osmsurround.org.

Usage

1
get_osm_surround(id, type = "data", progress = "none")

Arguments

id

A vector of OpenStreetMap IDs.

type

Type of data to return. Can be one of "points", "lines", "polygons", or "data". If "data", a data frame will be returned rather than spatial data.

progress

Type of progress bar to display.

Value

Spatial data or data frame.

Author(s)

Stuart K. Grange

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 

# Get a walking route in York as spatial lines
sp_walking_route <- get_osm_surround(1069837, type = "lines")

# Get some polygons for New York
sp_new_york <- get_osm_surround(c(369519, 369518, 3954665), "polygons")

# Plot
leaflet_plot(sp_new_york)


## End(Not run)

skgrange/gissr documentation built on Nov. 5, 2019, 2:58 p.m.