Questions tagged [gpx]

GPX (the GPS Exchange Format) is a light-weight XML data format for the interchange of GPS data. Source: http://www.topografix.com/gpx.asp

GPX (the GPS Exchange Format) is a light-weight XML data format for the interchange of GPS data (waypoints, routes, and tracks) between applications and Web services on the Internet.

It was devised by Topographix.

Current Status

The GPX 1.1 schema was released on August 9, 2004.

Gpx example:

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="GeoWgs84 Harness">
  <metadata>
    <bounds minlat="-22.92166941" minlon="44.37930616" maxlat="-20.11240872" maxlon="45.58278193" />
  </metadata>
  <wpt lat="-22.85100527" lon="45.57800895">
    <name>Ox</name>
    <sym>Dot</sym>
  </wpt>
  <rte>
    <name>Spiral</name>
    <rtept lat="-22.85100527" lon="45.57800895">
      <name>Ox</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85091497" lon="45.57800895">
      <name>A00</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85083842" lon="45.57808352">
      <name>A01</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85100527" lon="45.57800895">
      <name>Ox</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85074986" lon="45.57828453">
      <name>A02</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85072882" lon="45.57872908">
      <name>A03</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85100527" lon="45.57800895">
      <name>Ox</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85100526" lon="45.57956788">
      <name>A04</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85211105" lon="45.58088949">
      <name>A05</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85100527" lon="45.57800895">
      <name>Ox</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85509172" lon="45.58241839">
      <name>A06</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.86168376" lon="45.58278193">
      <name>A07</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85100527" lon="45.57800895">
      <name>Ox</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.87412204" lon="45.57800895">
      <name>A08</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.89371830" lon="45.55891257">
      <name>A09</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85100527" lon="45.57800895">
      <name>Ox</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.91637356" lon="45.50742620">
      <name>A10</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.92166941" lon="45.39356015">
      <name>A11</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85100527" lon="45.57800895">
      <name>Ox</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85050504" lon="45.17892468">
      <name>A12</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.56621709" lon="44.84211913">
      <name>A13</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85100527" lon="45.57800895">
      <name>Ox</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-21.80087521" lon="44.45769348">
      <name>A14</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-20.11240872" lon="44.37930616">
      <name>A15</name>
      <sym>Dot</sym>
    </rtept>
    <rtept lat="-22.85100527" lon="45.57800895">
      <name>Ox</name>
      <sym>Dot</sym>
    </rtept>
  </rte>
  <extensions />
</gpx>

Resources

376 questions
3
votes
1 answer

Can OpenLayers parse GPX data which is stored as a string in a javascript variable?

I have a map site using OpenLayers, which imports and displays GPX data using the following code: var lgpx = new OpenLayers.Layer.GML(gpxtracktitle, gpxfileaddress, { format: OpenLayers.Format.GPX, style: {strokeColor:…
3
votes
4 answers

Gpx parser or GPX documentation

I'm developing an iOS 5 application. I want to develop a GPX parser but I'm wondering if there is one developed before I start to developing it. Do you know if there is an Objective-c GPX parser?
VansFannel
  • 45,055
  • 107
  • 359
  • 626
3
votes
2 answers

How to insert xml prolog using SimpleStorage to generate gpx file?

I plan to adopt once and for all handy a tool for handling the creation of gpx files. I believe SimpleStorage which is a OmniXML based storage suited for easy XML data management, data storage and data interchange beetween systems fits it. Here is…
menjaraz
  • 7,551
  • 4
  • 41
  • 81
3
votes
2 answers

GPX parsing patterns and "standards"

I would like to continue the discussion from this post: GPX Schema validation problems. To go directly to the point, I want to ask how people are parsing and working with GPX files in their software or give me suggestions as to how one should do…
Petar
  • 2,241
  • 1
  • 24
  • 38
3
votes
5 answers

GPX Schema validation problems

I am building an application that works primarily with GPX files as the input data. Given the fact that gpx files are supposed to be defined by the gpx schema (as defined here: http://www.topografix.com/gpx.asp), the first thing that I taught is…
Petar
  • 2,241
  • 1
  • 24
  • 38
3
votes
1 answer

iOS - Check if Developer Mode is ON (Swift)

My App relies on checking user location upon start. On iOS 16, when the user enables the Developer Mode on Privacy Settings they can simulate any location on the device using a GPX file. The device actually changes the location of the device and…
PoolHallJunkie
  • 1,345
  • 14
  • 33
3
votes
4 answers

Parsing XML file with duplicate tags

I currently use an XML parser to extract the name of a route from a GPX (XML) file. Each GPX files contains a single "name" tag which is what I've been extracting. Here's the script: #! /bin/bash gpxpath=/mnt/gpxfiles; export gpxpath for file in…
Huskie69
  • 795
  • 3
  • 11
  • 31
3
votes
2 answers

Storing GPX-Files in Database mysql vs. postgis (postgresql)

i'm working on a web-platform which analyzes GPX-Tracks and draws some profiles, speed stuff, etc. Currently i just calculate the statistics once (like distance, avg speed, duration, height gain/loose) and keep the GPX-File. The Profile is drawn…
Sven Eppler
  • 1,646
  • 1
  • 15
  • 26
3
votes
0 answers

Loading multiple gpx files with leaflet

I started using Leaflet for organizing my gpx files combined with Mysql/PHP. I read the gpx files with the plugin leaflet-gpx. All is working well see screenshot, but the loading takes longer and longer. Every gpx files is read out one after an…
3
votes
4 answers

GPX to KML in PHP

I am working in a project where people upload GPX and I am trying to convert a GPX file into a KML file, so they have the option of downloading in both formats. I found a XSLT file that supposedly transforms GPX into KML but when I try to do the…
Ares
  • 5,905
  • 3
  • 35
  • 51
3
votes
2 answers

gpxpy: How to extract heart rate data from gpx file

This commit to gpxpy library includes additional parsing for Garmin 1.1 extensions. However it appears the code has changed a lot since this commit and it appears that extensions are parsed automatically now. However I've been unable to figure out…
user6972
  • 851
  • 1
  • 15
  • 32
3
votes
2 answers

Counting number of laps from GPS coordinate recordings

I have a GPX file with large set of points (longitude and latitude sorted by time), how can I calculate how many laps my set contains? The GPS is recorded during circuit racing session. The lap is number of times vehicle passes start/finish of…
Daniil Harik
  • 4,619
  • 10
  • 55
  • 60
3
votes
3 answers

GPX File does not load iOS Xcode

I am trying to simulate the locations, using a gpx file. The file does not work in the Xcode nor does it show any error. The file size is 1.1 MB , has a tracking data from startPoint (A) to startPoint (B). Does that cause any issues, any…
NNikN
  • 3,720
  • 6
  • 44
  • 86
3
votes
1 answer

How to fake location iOS

I want to change real location (fake location) on iphone with out jaibreak (not Simulator). So I think I can add GPX by code. Any suggest or other solutions?
Thành Ngô Văn
  • 142
  • 3
  • 10
3
votes
2 answers

How to handle deep XQuery recursion issues

I am working on an XQuery library for getting simple geospatial information from GPS files (it's called GPXQuery and available at GitHub). GPX files often contain tracks of GPS coordinates, and can get quite big. My biggest test file has 20'000…
dret
  • 531
  • 3
  • 7