Learn R Programming

osmplotr (version 0.2.0)

get_highway_cycle: get_highway_cycle

Description

Takes a list of OpenStreetMap highways returned by extract_highways() and sequentially connects closest nodes of adjacent highways until the set of highways connects to form a cycle.

Usage

get_highway_cycle(highways)

Arguments

highways
A list of highways as returned by extract_highways(), each element of which is a list of distinct segments for a particular OSM highway.

Value

  • A modified version of highways, extended by the addition of connecting nodes.