get_osm_boundary: Function to get OpenStreetMap boundaries as spatial polygons.

View source: R/get_osm_boundary.R

get_osm_boundaryR Documentation

Function to get OpenStreetMap boundaries as spatial polygons.

Description

get_osm_boundary accesses this polygon creator tool.

Usage

get_osm_boundary(id, way = FALSE, sleep = 1, sf = FALSE, verbose = FALSE)

Arguments

id

A vector of OpenStreetMap relations. An integer key.

way

Is id a way? If TRUE, a different method is needed which scrapes XML directly from OpenStreetMap for nodes and is a bit slow.

sleep

Number of seconds between server queries. This is useful if many large polygons are being requested.

sf

Should the function return a sf object?

verbose

Should the function give messages?

Value

SpatialPolygonsDataFrame with WGS84 projection.

Author(s)

Stuart K. Grange

Examples


# Get North York Moors National Park boundary
sp_moors <- get_osm_boundary(409150)


skgrange/gissr documentation built on June 20, 2024, 12:02 a.m.