ExifTool Forum

General => Other Discussion => Topic started by: Alan Clifford on February 04, 2021, 09:05:56 AM

Title: gpx format question.
Post by: Alan Clifford on February 04, 2021, 09:05:56 AM
I have a some examples from different apps.  One has the trkpt data one one line

<trkpt lat="51.25143627" lon="-0.53017487"><ele>114.511</ele><time>2021-02-04T10:53:13Z</time><sat>20</sat></trkpt>

whilst another has multiple lines

<trkpt lat="51.2514386" lon="-0.5301877">
<ele>114.5107421875</ele>
<time>2021-02-04T10:53:13Z</time>
<extensions>
<gpx10:speed>1.3395644426345825</gpx10:speed>
<ogt10:accuracy>9.170000076293945</ogt10:accuracy>
<gpx10:course>306.52410888671875</gpx10:course></extensions>
</trkpt>


which has messed up my rather naive gpx to csv script.  But that's solvable.

Hower, both have <ele> and then <time> in that order.  Is this order fixed or can they move around?
Title: Re: gpx format question.
Post by: Alan Clifford on February 04, 2021, 09:14:21 AM
Answering myself, I've just found a comment in https://www.topografix.com/GPX/1/1/#type_wptType

Schema Component Representation
<xsd:complexType name="wptType">
<xsd:sequence>
<-- elements must appear in this order -->
<-- Position info -->
<xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
<xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
<xsd:element name="magvar" type="degreesType" minOccurs="0"/>
<xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>
<-- Description info -->
<xsd:element name="name" type="xsd:string" minOccurs="0"/>