1

I have a problem regarding GPX tracks that were created from Shapefiles using QGIS.

The shapefiles were created by selecting all parts of a route from a PostGIS database. The polylines were merged with QGIS and then exported as a GPX file by using the 'Save as' option.

The resulting GPX files look like this:

<?xml version="1.0"?>
<gpx version="1.1" creator="GDAL 1.11.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogr="http://osgeo.org/gdal" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<metadata><bounds minlat="51.533449555703989" minlon="6.983701320292362" maxlat="51.554475633460669" maxlon="7.010408625662222"/></metadata>

<trk>
<extensions>
<ogr:OBJECTID>31751.0</ogr:OBJECTID>
</extensions>
<trkseg>
<trkpt lat="51.54792023947288" lon="6.986589223144231">
</trkpt>
<trkpt lat="51.547997675144856" lon="6.986820893755352">
</trkpt>
<trkpt lat="51.548138136988818" lon="6.986910766789045">
</trkpt>
<trkpt lat="51.548352505219341" lon="6.987013118209317">
</trkpt>
<trkpt lat="51.549051234512156" lon="6.987331861261017">
</trkpt>
</trkseg>
<trkseg>
<trkpt lat="51.54792023947288" lon="6.986589223144231">
</trkpt>
<trkpt lat="51.547840418735099" lon="6.986046522387352">
</trkpt>
<trkpt lat="51.547799254904852" lon="6.985851100932796">
</trkpt>
<trkpt lat="51.547750380482739" lon="6.985724171010038">
</trkpt>  

And so on. There are 8 segments of the track in total.

The issue is that while some web applications are able to display this track without a problem (like http://www.gpsvisualizer.com/)

Displayed using GPS Visualizer

many others are not (http://www.maplorer.com/view_gpx.html ) Displayed using maplorer

I have already tried adding timestamps to the points, but that didn't change anything.

I assume that the issue has something to do with the segments because if I merge all segments of the track using the GPX_Editor from Sourceforge the route gets distorted exactly like it does in the maplorer example. No matter what application i use, the track is either displayed correctly as in the first example or falsely like in the second example.

1 Answer 1

1

It might be that false displaying applications don't respect <trkseg> correctly.

If you add </trk><trk> to every trkseg change, it might come out correct.

Otherwise you have to create a new GPX file for every <trkseg> using one trkseg per track and file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.