Learn R Programming

osmapiR (version 0.2.4)

osm_create_gpx: Create GPS trace

Description

Use this to upload a GPX file or archive of GPX files. Requires authentication.

Usage

osm_create_gpx(
  file,
  description,
  tags,
  visibility = c("private", "public", "trackable", "identifiable")
)

Value

A number representing the ID of the new gpx.

Arguments

file

The GPX file path containing the track points.

description

The trace description. Cannot be empty. Maximum length is 255 characters.

tags

A string containing tags for the trace. Can be empty.

visibility

One of the following: private, public, trackable, identifiable. For explanations see OSM trace upload page or Visibility of GPS traces).

Details

Note that for successful processing, the file must contain trackpoints (<trkpt>), not only waypoints, and the trackpoints must have a valid timestamp. Since the file is processed asynchronously, the call will complete successfully even if the file cannot be processed. The file may also be a .tar, .tar.gz or .zip containing multiple gpx files, although it will appear as a single entry in the upload log.

See Also

Other edit GPS traces' functions: osm_delete_gpx(), osm_update_gpx()

Examples

Run this code
vignette("how_to_edit_gps_traces", package = "osmapiR")

Run the code above in your browser using DataLab