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

View source: R/get_osm_surround.R

get_osm_surroundR Documentation

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

Description

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

Usage

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

## 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 June 20, 2024, 12:02 a.m.