|
SOLUTIONS
|
MATHEMATICA IMPORT/EXPORT FORMAT
GPX (.gpx)
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.
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 fully supports the GPX format version 1.1.
Import and ExportImport and Export
- Import["file.gpx"] imports a GPX file and returns a combined rendering of all graphics layers.
- Import["file.gpx"] returns a Graphics object.
- Import["file.gpx", "elem"] imports the specified element from a GPX file.
- Import["file.gpx", {{"elem1", "elem2", ...}}] imports multiple elements.
- See the reference pages for full general information on Import.
- ImportString supports the GPX format.
ElementsElements
- General Import elements:
-
"Elements" list of elements and options available in this file "Rules" full list of rules for each element and option "Options" list of rules for options, properties, and settings - Data representation elements:
-
"Data" graphics primitives for each layer "Graphics" all layers combined into a single Graphics object "GraphicsList" list of graphics representing the layers of a GPX archive - Import by default uses the
element for the GPX format. - Import with the element
gives the combined graphics contents as vector and raster graphics. - Import["file.gpx", "Data"] returns an expression of the form
. 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.
ExamplesExamplesopen allclose all
Basic Examples (3)Basic Examples (3)
Import all layers from the file:
| In[1]:= |
| Out[1]= | ![]() |
List the layer names from the file:
| In[1]:= |
| Out[1]= |
| In[1]:= |
| Out[1]= | ![]() |
Compute the elevation range for the data:
| In[1]:= |
| Out[1]= |
Plot the elevation profile for the route:
| In[2]:= |
| Out[2]= | ![]() |
Compute the total distance in meters by adding up the line segments:
| In[1]:= |
| Out[1]= |
New in 8
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »




