]> git.street.me.uk Git - andy/gpx.git/blame - src/libgpx/gpx-1-0.xsd
Bugfix: Timestamps not converted to UTC when writing GPX
[andy/gpx.git] / src / libgpx / gpx-1-0.xsd
CommitLineData
8fadecc6
AS
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- GPX.xsd version 1.0 - For more information on GPX and this schema, visit http://www.topografix.com/gpx.asp -->
3<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gpx="http://www.topografix.com/GPX/1/0" targetNamespace="http://www.topografix.com/GPX/1/0" elementFormDefault="qualified">
4
5<!-- Main GPX definition -->
6
7 <xsd:element name="gpx">
8 <xsd:complexType>
9 <xsd:sequence>
10 <xsd:element name="name" type="xsd:string" minOccurs="0"/> <!-- GPX file name -->
11 <xsd:element name="desc" type="xsd:string" minOccurs="0"/> <!-- GPX file description -->
12 <xsd:element name="author" type="xsd:string" minOccurs="0"/> <!-- GPX file author -->
13 <xsd:element name="email" type="gpx:emailType" minOccurs="0"/> <!-- GPX file author email -->
14 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/> <!-- GPX file URL -->
15 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
16 <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/> <!-- GPX file creation time -->
17 <xsd:element name="keywords" type="xsd:string" minOccurs="0"/> <!-- GPX file keywords -->
18 <xsd:element name="bounds" type="gpx:boundsType" minOccurs="0"/> <!-- GPX file bounding rect -->
19 <xsd:element name="wpt" minOccurs="0" maxOccurs="unbounded">
20 <xsd:complexType>
21 <xsd:sequence> <!-- elements must appear in this order -->
22 <!-- Position info -->
23 <xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
24 <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
25 <xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/>
26 <xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>
27
28 <!-- Description info -->
29 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
30 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
31 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
32 <xsd:element name="src" type="xsd:string" minOccurs="0"/>
33 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
34 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
35 <xsd:element name="sym" type="xsd:string" minOccurs="0"/>
36 <xsd:element name="type" type="xsd:string" minOccurs="0"/>
37
38 <!-- Accuracy info -->
39 <xsd:element name="fix" type="gpx:fixType" minOccurs="0"/>
40 <xsd:element name="sat" type="xsd:nonNegativeInteger" minOccurs="0"/>
41 <xsd:element name="hdop" type="xsd:decimal" minOccurs="0"/>
42 <xsd:element name="vdop" type="xsd:decimal" minOccurs="0"/>
43 <xsd:element name="pdop" type="xsd:decimal" minOccurs="0"/>
44 <xsd:element name="ageofdgpsdata" type="xsd:decimal" minOccurs="0"/>
45 <xsd:element name="dgpsid" type="gpx:dgpsStationType" minOccurs="0"/>
46
47 <!-- you can add your own privately defined wpt elements at the end of the wpt -->
48 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
49 </xsd:sequence>
50 <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
51 <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
52 </xsd:complexType>
53 </xsd:element>
54 <xsd:element name="rte" minOccurs="0" maxOccurs="unbounded">
55 <xsd:complexType>
56 <xsd:sequence>
57 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
58 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
59 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
60 <xsd:element name="src" type="xsd:string" minOccurs="0"/> <!-- the source of this data: "Garmin eTrex", "Map", etc -->
61 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
62 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
63 <xsd:element name="number" type="xsd:nonNegativeInteger" minOccurs="0"/> <!-- GPS track number -->
64 <!-- <xsd:element name="type" type="xsd:string" minOccurs="0"/> PROPOSED -->
65 <!-- you can add your own privately defined rte elements at the end of the rte -->
66 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
67 <xsd:element name="rtept" minOccurs="0" maxOccurs="unbounded">
68 <xsd:complexType>
69 <xsd:sequence> <!-- elements must appear in this order -->
70
71 <!-- Position info -->
72 <xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
73 <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
74 <xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/>
75 <xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>
76
77 <!-- Description info -->
78 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
79 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
80 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
81 <xsd:element name="src" type="xsd:string" minOccurs="0"/>
82 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
83 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
84 <xsd:element name="sym" type="xsd:string" minOccurs="0"/>
85 <xsd:element name="type" type="xsd:string" minOccurs="0"/>
86
87 <!-- Accuracy info -->
88 <xsd:element name="fix" type="gpx:fixType" minOccurs="0"/>
89 <xsd:element name="sat" type="xsd:nonNegativeInteger" minOccurs="0"/>
90 <xsd:element name="hdop" type="xsd:decimal" minOccurs="0"/>
91 <xsd:element name="vdop" type="xsd:decimal" minOccurs="0"/>
92 <xsd:element name="pdop" type="xsd:decimal" minOccurs="0"/>
93 <xsd:element name="ageofdgpsdata" type="xsd:decimal" minOccurs="0"/>
94 <xsd:element name="dgpsid" type="gpx:dgpsStationType" minOccurs="0"/>
95
96 <!-- you can add your own privately defined rtept elements at the end of the rtept -->
97 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
98 </xsd:sequence>
99 <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
100 <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
101 </xsd:complexType>
102 </xsd:element>
103 </xsd:sequence>
104 </xsd:complexType>
105 </xsd:element>
106 <xsd:element name="trk" minOccurs="0" maxOccurs="unbounded">
107 <xsd:complexType>
108 <xsd:sequence>
109 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
110 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
111 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
112 <xsd:element name="src" type="xsd:string" minOccurs="0"/> <!-- the source of this data: "Garmin eTrex", "Map", etc -->
113 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
114 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
115 <xsd:element name="number" type="xsd:nonNegativeInteger" minOccurs="0"/> <!-- GPS track number -->
116 <!-- <xsd:element name="type" type="xsd:string" minOccurs="0"/> PROPOSED -->
117 <!-- you can add your own privately defined trk elements at the end of the trk -->
118 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
119 <xsd:element name="trkseg" minOccurs="0" maxOccurs="unbounded">
120 <xsd:complexType>
121 <xsd:sequence> <!-- elements must appear in this order -->
122 <xsd:element name="trkpt" minOccurs="0" maxOccurs="unbounded">
123 <xsd:complexType>
124 <xsd:sequence> <!-- elements must appear in this order -->
125
126 <!-- Position info -->
127 <xsd:element name="ele" type="xsd:decimal" minOccurs="0"/>
128 <xsd:element name="time" type="xsd:dateTime" minOccurs="0"/>
129 <xsd:element name="course" type="gpx:degreesType" minOccurs="0"/>
130 <xsd:element name="speed" type="xsd:decimal" minOccurs="0"/>
131 <xsd:element name="magvar" type="gpx:degreesType" minOccurs="0"/>
132 <xsd:element name="geoidheight" type="xsd:decimal" minOccurs="0"/>
133
134 <!-- Description info -->
135 <xsd:element name="name" type="xsd:string" minOccurs="0"/>
136 <xsd:element name="cmt" type="xsd:string" minOccurs="0"/>
137 <xsd:element name="desc" type="xsd:string" minOccurs="0"/>
138 <xsd:element name="src" type="xsd:string" minOccurs="0"/>
139 <xsd:element name="url" type="xsd:anyURI" minOccurs="0"/>
140 <xsd:element name="urlname" type="xsd:string" minOccurs="0"/>
141 <xsd:element name="sym" type="xsd:string" minOccurs="0"/>
142 <xsd:element name="type" type="xsd:string" minOccurs="0"/>
143
144 <!-- Accuracy info -->
145 <xsd:element name="fix" type="gpx:fixType" minOccurs="0"/>
146 <xsd:element name="sat" type="xsd:nonNegativeInteger" minOccurs="0"/>
147 <xsd:element name="hdop" type="xsd:decimal" minOccurs="0"/>
148 <xsd:element name="vdop" type="xsd:decimal" minOccurs="0"/>
149 <xsd:element name="pdop" type="xsd:decimal" minOccurs="0"/>
150 <xsd:element name="ageofdgpsdata" type="xsd:decimal" minOccurs="0"/>
151 <xsd:element name="dgpsid" type="gpx:dgpsStationType" minOccurs="0"/>
152
153 <!-- you can add your own privately defined trkpt elements at the end of the trkpt -->
154 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
155 </xsd:sequence>
156 <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
157 <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
158 </xsd:complexType>
159 </xsd:element>
160 </xsd:sequence>
161 </xsd:complexType>
162 </xsd:element>
163 </xsd:sequence>
164 </xsd:complexType>
165 </xsd:element>
166 <!-- you can add your own privately defined elements at the end of the GPX file -->
167 <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
168 </xsd:sequence>
169 <xsd:attribute name="version" type="xsd:string" use="required" fixed="1.0"/> <!-- version 1.0 -->
170 <xsd:attribute name="creator" type="xsd:string" use="required"/>
171 </xsd:complexType>
172 </xsd:element>
173
174 <!-- Other types used by GPX -->
175
176 <xsd:simpleType name="latitudeType">
177 <xsd:restriction base="xsd:decimal">
178 <xsd:minInclusive value="-90.0"/>
179 <xsd:maxInclusive value="90.0"/>
180 </xsd:restriction>
181 </xsd:simpleType>
182
183 <xsd:simpleType name="longitudeType">
184 <xsd:restriction base="xsd:decimal">
185 <xsd:minInclusive value="-180.0"/>
186 <xsd:maxInclusive value="180.0"/>
187 </xsd:restriction>
188 </xsd:simpleType>
189
190 <xsd:simpleType name="degreesType"> <!-- for bearing, heading, course. Units are degrees, true -->
191 <xsd:restriction base="xsd:decimal">
192 <xsd:minInclusive value="0.0"/>
193 <xsd:maxInclusive value="360.0"/>
194 </xsd:restriction>
195 </xsd:simpleType>
196
197 <xsd:simpleType name="fixType">
198 <xsd:restriction base="xsd:string">
199 <xsd:enumeration value="none"/> <!-- none means GPS had no fix. To signify "the fix info is unknown, leave out the <fix> tag entirely -->
200 <xsd:enumeration value="2d"/>
201 <xsd:enumeration value="3d"/>
202 <xsd:enumeration value="dgps"/>
203 <xsd:enumeration value="pps"/> <!-- military signal used -->
204 </xsd:restriction>
205 </xsd:simpleType>
206
207 <xsd:simpleType name="dgpsStationType">
208 <xsd:restriction base="xsd:integer">
209 <xsd:minInclusive value="0"/>
210 <xsd:maxInclusive value="1023"/>
211 </xsd:restriction>
212 </xsd:simpleType>
213
214 <xsd:complexType name="boundsType"> <!-- bounding rect for data in file -->
215 <xsd:attribute name="minlat" type="gpx:latitudeType" use="required"/>
216 <xsd:attribute name="minlon" type="gpx:longitudeType" use="required"/>
217 <xsd:attribute name="maxlat" type="gpx:latitudeType" use="required"/>
218 <xsd:attribute name="maxlon" type="gpx:longitudeType" use="required"/>
219 </xsd:complexType>
220
221 <xsd:simpleType name="emailType">
222 <xsd:restriction base="xsd:string">
223 <xsd:pattern value="[\p{L}_]+(\.[\p{L}_]+)*@[\p{L}_]+(\.[\p{L}_]+)+"/>
224 </xsd:restriction>
225 </xsd:simpleType>
226
227</xsd:schema>