Learn R Programming

osmplotr (version 0.1-2)

extract_highways: extract_highways

Description

Extracts a list of named OpenStreetMap highways. OSM data are neither structured nor ordered; this routine reduces data for each given highway to a minimal number of discrete and sequentially ordered segments. These segments may or may not connect, yet may be connected at their nearest points with connect_highways().

Usage

extract_highways(highway_names = NULL, bbox = NULL)

Arguments

highway_names
A vector of highway names passed directly to the Overpass API. Wildcards and whitespaces are '.'; for other options see overpass help.
bbox
the bounding box within which to look for highways. Must be a vector of 4 elements (xmin, ymin, xmax, ymax).

Value

  • A list of highways matching 'highway_names', each element of which is a list of distinct components for the given highway.