Description Usage Arguments Value Content of the file Details Examples
Fetch the data on OpenStreetMap server, processes it and export it to a GPX file.
1 2 3 4 5 6 7 8 |
id_rel |
the identifier of the OpenStreetMap relation. |
path |
the directory where to write the GPX file. |
filename |
name of the file. If |
osm_info |
include informations about OpenStreetMap nodes (id and version). |
overpass_url |
instance of the Overpass API to use to retrieve data (see this page for a list of available instances). |
quiet |
|
The data used to export the file, invisibly. This is the same as the
result of extract_data
.
transport line metadata : some retrieved from OSM (for example the version of the relation) and some calculated by the package (for example the length in kilometers) ;
coordinates and names of the stops (role = "stop" in the relation), as
wpt(s)
elements ;
list of the track points in the correct order, as a trkseg
element.
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:
write_gpx(id_rel = "123767")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.