GPX (.gpx)
- Import fully supports the GPX format Version 1.1.
Background & Context

-
- GPX global positioning data.
- Standard format for exchanging GPS location data.
- Stores GIS data recorded with GPS devices.
- GPX is an acronym for GPS Exchange Format.
- XML format.
- Introduced in 2002.
Import

- Import["file.gpx"] imports a GPX file and returns a combined rendering of all graphics layers.
- Import["file.gpx"] returns a GeoGraphics object.
- Import["file.gpx","elem"] imports the specified element from a GPX file.
- Import["file.gpx",{{"elem1","elem2",…}}] imports multiple elements.
- See the following reference pages for full general information:
-
Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array
Import Elements

- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data representation elements:
-
"Data" graphics primitives for each layer "Graphics" all layers combined into a single GeoGraphics object "GraphicsList" list of graphics representing the layers of a GPX archive - Import by default uses the "Graphics" element for the GPX format.
- Import["file.gpx","Data"] returns an expression of the form {layer1,layer2,layer3} . Individual layers are given as a list of rules representing the geometry as well as numerical and textual information associated with the features.
- Meta-information elements:
-
"Comments" description of the file as a string "LayerNames" all layer names, given as a list of strings "Metadata" author and copyright information "Name" name given in the file "SpatialRange" range of geographic coordinates, typically given in decimal degrees - Geographic coordinates in GPX files always refer to the WGS84 datum.
Options

- General rendering options:
-
Background None background color ImageSize Automatic overall size of the image
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Import all layers from the file:
In[1]:=1

✖
https://wolfram.com/xid/0dxdt4k3j0-d0g1wu
Out[1]=1

Show a list of all import elements available for this file:
In[1]:=1

✖
https://wolfram.com/xid/0dxdt4k3j0-zit0xa
Out[1]=1

List the layer names from the file:
In[2]:=2

✖
https://wolfram.com/xid/0dxdt4k3j0-n1ghpt
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0dxdt4k3j0-7ry6k8
Out[3]=3

Applications (2)Sample problems that can be solved with this function
Show the data fields present in this file:
In[1]:=1

✖
https://wolfram.com/xid/0dxdt4k3j0-t86cvk
In[2]:=2

✖
https://wolfram.com/xid/0dxdt4k3j0-d6hadd
Out[2]=2

In[3]:=3

✖
https://wolfram.com/xid/0dxdt4k3j0-shkrw0
Out[3]=3

Compute the elevation range for the data:
In[4]:=4

✖
https://wolfram.com/xid/0dxdt4k3j0-mgkok8
Out[4]=4

Plot the elevation profile for the route:
In[5]:=5

✖
https://wolfram.com/xid/0dxdt4k3j0-feouoo
Out[5]=5

Compute the total distance by adding up the line segments:
In[1]:=1

✖
https://wolfram.com/xid/0dxdt4k3j0-cz0aj2
Out[1]=1
