osm_roads: Download and clean road features

View source: R/osm_roads.R

osm_roadsR Documentation

Download and clean road features

Description

Download road features using the OSM overpass API opq. Simple topology cleaning is applied using st_segments.

Usage

osm_roads(
  x,
  dist,
  speed,
  cores = 1L,
  remove_features = c("motorway", "motorway_link", "trunk", "trunk_link", "raceway"),
  split_segments = TRUE
)

Arguments

x

object of class sf.

dist

numeric; maximum number of minutes of the isochrones.

speed

numeric or character; either numeric value of speed or string containing the column name, that indicates the walking speed.

cores

the number of cores to use.

remove_features

character vector containing feature keys that should be excluded from the analysis (e.g. motorway)

split_segments

logical; should topology cleaning with st_segments be used.

Value

object of class sf containing road features.

Examples

## Not run: 
data(Erlangen)
osm_roads(Erlangen, dist = 20, speed = "Speed", cores = 4)

## End(Not run)

STBrinkmann/DRIGLUCoSE documentation built on Oct. 14, 2022, 11:26 a.m.