Global Mapper v26.0

Formatting of GPX for OpenStreetMap

mlasslo
mlasslo Global Mapper UserTrusted User
edited June 2010 in Bug Report
I have been trying to export a GPX file that I can upload to OpenStreetMap, but the format that is exported from Global Mapper is missing a key field. Global Mapper exports the GPX without the <time> tag. I tested this by bringing in a GPX file that had the <time> tag from DNR Garmin (it worked in OpenStreetMap) and exporting a GPX out of Global Mapper. Also the </trk> tag needs a <trk> added right after it. One more thing that stops it from working is the "/" in the </gpx> tag needs to be taken out. Here is a sample code that I exported out of Global Mapper that does not work:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<gpx
version="1.1"
creator="Global Mapper - http://www.globalmapper.com&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns="http://www.topografix.com/GPX/1/1&quot;
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"&gt;
<metadata>
</metadata>
<trk>
<name>25-JUN-10</name>
<desc>Tracklog</desc>
<trkseg>
<trkpt lat="39.598417" lon="-110.808921">
</trkpt>
</trkseg>
</trk>
<extensions>
</extensions>
</gpx>

Here is a sample code that works that was exported out of Global Mapper and edited:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<gpx
version="1.1"
creator="Global Mapper - http://www.globalmapper.com&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot;
xmlns="http://www.topografix.com/GPX/1/1&quot;
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"&gt;
<trk>
<trkseg>
<trkpt lat="39.617951" lon="-110.790293">
<time>1989-12-30T23:59:59Z</time>
</trkpt>
</trkseg>
</trk><trk>
<gpx>

Comments

  • mlasslo
    mlasslo Global Mapper User Trusted User
    edited June 2010
    One more question/feature request...Is there anyway to export/include the table attribute data in the GPX file?
  • global_mapper
    global_mapper Administrator
    edited June 2010
    What version of Global Mapper are you using? If a feature has a per-vertex time list, then a <time> attribute should be included for each <trkpt> element in the generated GPX file. However this was not the case for older Global Mapper releases.

    Your other suggestions would result in an invalid GPX file. You can't have an opening <trk> segment without a </trk> element to close it. Likewise the last </gpx> has to retain the slash to indicate that it is closing the opening <gpx> element. Without the slash it would start at new <gpx> element, resulting in 2 opened and not closed <gpx> elements.

    There is not a way to include generic attributes in the GPX file without building the display label from the attributes as some software won't handle a GPX file with fields that it doesn't know about.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • mlasslo
    mlasslo Global Mapper User Trusted User
    edited June 2010
    I've using version 11.02 64 bit. I also have the 32 bit version. It does have a per-vertex time list, but when I export it out of Global Mapper it doesn't include the <time> attribute.

    I understand it would result in an invalid GPX. I was just pointing out that I had to change it (to the wrong syntax) to make it work. I suppose I should contact OpenStreetMap about this and not you...sorry.

    Thanks,

    Mellissa