read_gpx: Read a .gpx file into a data.frame

Description Usage Arguments Value Examples

View source: R/read_gpx.R

Description

Read a .gpx file into a list of data.frames, one each for tracks, routes and waypoints.

The named element 'tracks' is a named list of tracks present in the file. It will always contain columns for Elevation, Time, Latitude, Longitude, and Segment ID.

The named element 'routes' is an unnamed list of routes present in the file. It will always contain columns for Elevation, Time, Latitude, and Longitude.

The named element 'waypoints' is an unnamed list of routes present in the file. It will always contain columns for Elevation, Time, Latitude, and Longitude.

In each case, if there are extensions in the file within the record type, it will attempt to include them as columns as well. If there are no points of the specified type, it will contain a 0-row data.frame with all the standard column names.

Usage

1

Arguments

file

A path to a .gpx file

Value

List of data frames

Examples

1
2
3
4
5
6
7
## Not run: 
hikes = read_gpx('hiking_file.gpx')
hikes$tracks
hikes$routes
hikes$waypoints

## End(Not run)

gpx documentation built on Nov. 8, 2021, 5:08 p.m.