Description Usage Arguments Value Details Examples
Fetch data on OpenStreetMap server, processes it and stores it into a list.
1 2 3 4 5 | extract_data(
id_rel,
overpass_url = "http://overpass-api.de/api/interpreter",
quiet = FALSE
)
|
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 |
|
A list containing the following elements :
bounds
: the bounding box of the data ;
rel_tags
: the tags of the relation in the OpenStreetMap database ;
rel_attr
: metadata of the relation, such as id, version, date of
last modification... ;
stop_count
: number of stops ;
trkpt_count
: numbre of points of the track ;
trk_km
: length of the track, in kilometers ;
stop_base
: data.frame with informations about stops ;
trkpt_base
: data.frame with informations about trackpoints (in
particular the distance between too consecutive points, in meters).
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.
1 2 3 4 5 | ## Not run:
extract_data(id_rel = "123767")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.