extract_data: Get the data about an OSM transport line into R

Description Usage Arguments Value Details Examples

View source: R/extract_data.R

Description

Fetch data on OpenStreetMap server, processes it and stores it into a list.

Usage

1
2
3
4
5
extract_data(
  id_rel,
  overpass_url = "http://overpass-api.de/api/interpreter",
  quiet = FALSE
)

Arguments

id_rel

the identifier of the OpenStreetMap relation.

overpass_url

instance of the Overpass API to use to retrieve data (see this page for a list of available instances).

quiet

TRUE to desactivate information messages.

Value

A list containing the following elements :

Details

The data coming from the OSM server must be clean for the processing to succeed.

As stated in the OSM documentation, the ways in the relation should be listed beginning with the way at the initial stop position and ending with the way at the terminal stop, in the right order. The package will automatically reverse some ways to produce a continuous track.

If roundabouts (or any circular ways) are part of the track, osmbus will find its way through them, i.e. it will select the only nodes used by the transport vehicle from entrance to exit.

Examples

1
2
3
4
5
## Not run: 

extract_data(id_rel = "123767")

## End(Not run)

py-b/osmbus documentation built on Dec. 31, 2020, 2:10 a.m.