Learn R Programming

osmapiR (version 0.2.3)

osm_get_gpx_metadata: Download GPS Track Metadata

Description

Use this to access the metadata about GPX files. Available without authentication if the file is marked public. Otherwise only usable by the owner account and requires authentication.

Usage

osm_get_gpx_metadata(gpx_id, format = c("R", "sf", "xml"))

Value

If format = "R", returns a data frame with one trace per row. If format = "sf", returns a sf object from sf. If format = "xml", returns a xml2::xml_document with the following format:

<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="OpenStreetMap server">
  <gpx_file id="836619" name="track.gpx" lat="52.0194" lon="8.51807" uid="1234" user="Hartmut Holzgraefe" visibility="public" pending="false" timestamp="2010-10-09T09:24:19Z">
    <description>PHP upload test</description>
    <tag>test</tag>
    <tag>php</tag>
  </gpx_file>
  <gpx_file>
    ...
  </gpx_file>
</osm>

Arguments

gpx_id

A vector of track ids represented by a numeric or a character value.

format

Format of the output. Can be "R" (default), "sf", or "xml".

See Also

Other get GPS' functions: osm_get_data_gpx(), osm_get_points_gps(), osm_list_gpxs()

Examples

Run this code
if (FALSE) {
trk_meta <- osm_get_gpx_metadata(gpx_id = 3498170)
trk_meta
}

Run the code above in your browser using DataLab