View source: R/osmapi_gps_traces.R
osm_get_data_gpx | R Documentation |
Use this to download the full GPX file. Private and trackable traces are only available by the owner account. Requires authentication.
osm_get_data_gpx(gpx_id, format)
gpx_id |
The track id represented by a numeric or a character value. |
format |
Format of the output. If missing (default), the response will be the exact file that was uploaded.
If |
If missing format
, returns a xml2::xml_document with the original file data.
If format = "R"
, returns a data frame with one point per row and the attributes extracted from the xml response.
If format = "sf*"
, returns a sf
object from sf (see st_as_sf()
for details).
If format = "gpx"
, returns a xml2::xml_document in the GPX format.
If format = "xml"
, returns a xml2::xml_document in an undocumented format.
If you request refers to a multi-file archive the response when you force gpx
or xml
format will consist of
a non-standard simple concatenation of the files.
Extended data following schema http://www.garmin.com/xmlschemas/TrackPointExtension/v1
in gpx files will be extracted for format = "R"
and format = "sf_points"
, but lost for format = "sf_line"
.
Other get GPS' functions:
osm_get_gpx_metadata()
,
osm_get_points_gps()
,
osm_list_gpxs()
## Not run:
trk_data <- osm_get_data_gpx(gpx_id = 3498170, format = "R")
trk_data
## get attributes
attr(trk_data, "track")
attr(trk_data, "gpx_attributes")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.