Learn R Programming

plotKML (version 0.5-4)

readGPX: Import GPX (GPS track) files

Description

Reads various elements from a *.gpx file --- metadata, waypoints, tracks and routes --- and converts them to dataframes.

Usage

readGPX(gpx.file, metadata = TRUE, bounds = TRUE, 
              waypoints = TRUE, tracks = TRUE, routes = TRUE)

Arguments

gpx.file
location of the gpx.file
metadata
logical; species whether the metadata should be imported
bounds
logical; species whether the bounding box coordinates should be imported
waypoints
logical; species whether all waypoints should be imported
tracks
logical; species whether all tracks should be imported
routes
logical; species whether all routes should be imported

Details

Waypoint is a point of interest, or named feature on a map. Track is an ordered list of points describing a path. Route is an ordered list of waypoints representing a series of turn points leading to a destination.

References

  • GPX data format (http://www.topografix.com/gpx.asp)
  • XML tutorial (http://www.omegahat.org/RSXML/Tour.pdf)

See Also

rgdal::readOGR, kml_layer.STTDF

Examples

Run this code
# read GPX file from web:
fells_loop <- readGPX("http://www.topografix.com/fells_loop.gpx")
str(fells_loop)

Run the code above in your browser using DataLab