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 -->
4 xmlns:
xsd=
"http://www.w3.org/2001/XMLSchema"
5 xmlns:
gpx=
"http://www.topografix.com/GPX/1/0"
6 targetNamespace=
"http://www.topografix.com/GPX/1/0"
7 elementFormDefault=
"qualified">
9 <!-- Main GPX definition -->
11 <xsd:element name=
"gpx">
14 <xsd:element name=
"name" type=
"xsd:string" minOccurs=
"0"/> <!-- GPX file name -->
15 <xsd:element name=
"desc" type=
"xsd:string" minOccurs=
"0"/> <!-- GPX file description -->
16 <xsd:element name=
"author" type=
"xsd:string" minOccurs=
"0"/> <!-- GPX file author -->
17 <xsd:element name=
"email" type=
"gpx:emailType" minOccurs=
"0"/> <!-- GPX file author email -->
18 <xsd:element name=
"url" type=
"xsd:anyURI" minOccurs=
"0"/> <!-- GPX file URL -->
19 <xsd:element name=
"urlname" type=
"xsd:string" minOccurs=
"0"/>
20 <xsd:element name=
"time" type=
"xsd:dateTime" minOccurs=
"0"/> <!-- GPX file creation time -->
21 <xsd:element name=
"keywords" type=
"xsd:string" minOccurs=
"0"/> <!-- GPX file keywords -->
22 <xsd:element name=
"bounds" type=
"gpx:boundsType" minOccurs=
"0"/> <!-- GPX file bounding rect -->
23 <xsd:element name=
"wpt" minOccurs=
"0" maxOccurs=
"unbounded">
25 <xsd:sequence> <!-- elements must appear in this order -->
26 <!-- Position info -->
27 <xsd:element name=
"ele" type=
"xsd:decimal" minOccurs=
"0"/>
28 <xsd:element name=
"time" type=
"xsd:dateTime" minOccurs=
"0"/>
29 <xsd:element name=
"magvar" type=
"gpx:degreesType" minOccurs=
"0"/>
30 <xsd:element name=
"geoidheight" type=
"xsd:decimal" minOccurs=
"0"/>
32 <!-- Description info -->
33 <xsd:element name=
"name" type=
"xsd:string" minOccurs=
"0"/>
34 <xsd:element name=
"cmt" type=
"xsd:string" minOccurs=
"0"/>
35 <xsd:element name=
"desc" type=
"xsd:string" minOccurs=
"0"/>
36 <xsd:element name=
"src" type=
"xsd:string" minOccurs=
"0"/>
37 <xsd:element name=
"url" type=
"xsd:anyURI" minOccurs=
"0"/>
38 <xsd:element name=
"urlname" type=
"xsd:string" minOccurs=
"0"/>
39 <xsd:element name=
"sym" type=
"xsd:string" minOccurs=
"0"/>
40 <xsd:element name=
"type" type=
"xsd:string" minOccurs=
"0"/>
42 <!-- Accuracy info -->
43 <xsd:element name=
"fix" type=
"gpx:fixType" minOccurs=
"0"/>
44 <xsd:element name=
"sat" type=
"xsd:nonNegativeInteger" minOccurs=
"0"/>
45 <xsd:element name=
"hdop" type=
"xsd:decimal" minOccurs=
"0"/>
46 <xsd:element name=
"vdop" type=
"xsd:decimal" minOccurs=
"0"/>
47 <xsd:element name=
"pdop" type=
"xsd:decimal" minOccurs=
"0"/>
48 <xsd:element name=
"ageofdgpsdata" type=
"xsd:decimal" minOccurs=
"0"/>
49 <xsd:element name=
"dgpsid" type=
"gpx:dgpsStationType" minOccurs=
"0"/>
51 <!-- you can add your own privately defined wpt elements at the end of the wpt -->
52 <xsd:any namespace=
"##other" minOccurs=
"0" maxOccurs=
"unbounded"/>
54 <xsd:attribute name=
"lat" type=
"gpx:latitudeType" use=
"required"/>
55 <xsd:attribute name=
"lon" type=
"gpx:longitudeType" use=
"required"/>
58 <xsd:element name=
"rte" minOccurs=
"0" maxOccurs=
"unbounded">
61 <xsd:element name=
"name" type=
"xsd:string" minOccurs=
"0"/>
62 <xsd:element name=
"cmt" type=
"xsd:string" minOccurs=
"0"/>
63 <xsd:element name=
"desc" type=
"xsd:string" minOccurs=
"0"/>
64 <xsd:element name=
"src" type=
"xsd:string" minOccurs=
"0"/> <!-- the source of this data: "Garmin eTrex", "Map", etc -->
65 <xsd:element name=
"url" type=
"xsd:anyURI" minOccurs=
"0"/>
66 <xsd:element name=
"urlname" type=
"xsd:string" minOccurs=
"0"/>
67 <xsd:element name=
"number" type=
"xsd:nonNegativeInteger" minOccurs=
"0"/> <!-- GPS track number -->
68 <!-- <xsd:element name="type" type="xsd:string" minOccurs="0"/> PROPOSED -->
69 <!-- you can add your own privately defined rte elements at the end of the rte -->
70 <xsd:any namespace=
"##other" minOccurs=
"0" maxOccurs=
"unbounded"/>
71 <xsd:element name=
"rtept" minOccurs=
"0" maxOccurs=
"unbounded">
73 <xsd:sequence> <!-- elements must appear in this order -->
75 <!-- Position info -->
76 <xsd:element name=
"ele" type=
"xsd:decimal" minOccurs=
"0"/>
77 <xsd:element name=
"time" type=
"xsd:dateTime" minOccurs=
"0"/>
78 <xsd:element name=
"magvar" type=
"gpx:degreesType" minOccurs=
"0"/>
79 <xsd:element name=
"geoidheight" type=
"xsd:decimal" minOccurs=
"0"/>
81 <!-- Description info -->
82 <xsd:element name=
"name" type=
"xsd:string" minOccurs=
"0"/>
83 <xsd:element name=
"cmt" type=
"xsd:string" minOccurs=
"0"/>
84 <xsd:element name=
"desc" type=
"xsd:string" minOccurs=
"0"/>
85 <xsd:element name=
"src" type=
"xsd:string" minOccurs=
"0"/>
86 <xsd:element name=
"url" type=
"xsd:anyURI" minOccurs=
"0"/>
87 <xsd:element name=
"urlname" type=
"xsd:string" minOccurs=
"0"/>
88 <xsd:element name=
"sym" type=
"xsd:string" minOccurs=
"0"/>
89 <xsd:element name=
"type" type=
"xsd:string" minOccurs=
"0"/>
91 <!-- Accuracy info -->
92 <xsd:element name=
"fix" type=
"gpx:fixType" minOccurs=
"0"/>
93 <xsd:element name=
"sat" type=
"xsd:nonNegativeInteger" minOccurs=
"0"/>
94 <xsd:element name=
"hdop" type=
"xsd:decimal" minOccurs=
"0"/>
95 <xsd:element name=
"vdop" type=
"xsd:decimal" minOccurs=
"0"/>
96 <xsd:element name=
"pdop" type=
"xsd:decimal" minOccurs=
"0"/>
97 <xsd:element name=
"ageofdgpsdata" type=
"xsd:decimal" minOccurs=
"0"/>
98 <xsd:element name=
"dgpsid" type=
"gpx:dgpsStationType" minOccurs=
"0"/>
100 <!-- you can add your own privately defined rtept elements at the end of the rtept -->
101 <xsd:any namespace=
"##other" minOccurs=
"0" maxOccurs=
"unbounded"/>
103 <xsd:attribute name=
"lat" type=
"gpx:latitudeType" use=
"required"/>
104 <xsd:attribute name=
"lon" type=
"gpx:longitudeType" use=
"required"/>
110 <xsd:element name=
"trk" minOccurs=
"0" maxOccurs=
"unbounded">
113 <xsd:element name=
"name" type=
"xsd:string" minOccurs=
"0"/>
114 <xsd:element name=
"cmt" type=
"xsd:string" minOccurs=
"0"/>
115 <xsd:element name=
"desc" type=
"xsd:string" minOccurs=
"0"/>
116 <xsd:element name=
"src" type=
"xsd:string" minOccurs=
"0"/> <!-- the source of this data: "Garmin eTrex", "Map", etc -->
117 <xsd:element name=
"url" type=
"xsd:anyURI" minOccurs=
"0"/>
118 <xsd:element name=
"urlname" type=
"xsd:string" minOccurs=
"0"/>
119 <xsd:element name=
"number" type=
"xsd:nonNegativeInteger" minOccurs=
"0"/> <!-- GPS track number -->
120 <!-- <xsd:element name="type" type="xsd:string" minOccurs="0"/> PROPOSED -->
121 <!-- you can add your own privately defined trk elements at the end of the trk -->
122 <xsd:any namespace=
"##other" minOccurs=
"0" maxOccurs=
"unbounded"/>
123 <xsd:element name=
"trkseg" minOccurs=
"0" maxOccurs=
"unbounded">
125 <xsd:sequence> <!-- elements must appear in this order -->
126 <xsd:element name=
"trkpt" minOccurs=
"0" maxOccurs=
"unbounded">
128 <xsd:sequence> <!-- elements must appear in this order -->
130 <!-- Position info -->
131 <xsd:element name=
"ele" type=
"xsd:decimal" minOccurs=
"0"/>
132 <xsd:element name=
"time" type=
"xsd:dateTime" minOccurs=
"0"/>
133 <xsd:element name=
"course" type=
"gpx:degreesType" minOccurs=
"0"/>
134 <xsd:element name=
"speed" type=
"xsd:decimal" minOccurs=
"0"/>
135 <xsd:element name=
"magvar" type=
"gpx:degreesType" minOccurs=
"0"/>
136 <xsd:element name=
"geoidheight" type=
"xsd:decimal" minOccurs=
"0"/>
138 <!-- Description info -->
139 <xsd:element name=
"name" type=
"xsd:string" minOccurs=
"0"/>
140 <xsd:element name=
"cmt" type=
"xsd:string" minOccurs=
"0"/>
141 <xsd:element name=
"desc" type=
"xsd:string" minOccurs=
"0"/>
142 <xsd:element name=
"src" type=
"xsd:string" minOccurs=
"0"/>
143 <xsd:element name=
"url" type=
"xsd:anyURI" minOccurs=
"0"/>
144 <xsd:element name=
"urlname" type=
"xsd:string" minOccurs=
"0"/>
145 <xsd:element name=
"sym" type=
"xsd:string" minOccurs=
"0"/>
146 <xsd:element name=
"type" type=
"xsd:string" minOccurs=
"0"/>
148 <!-- Accuracy info -->
149 <xsd:element name=
"fix" type=
"gpx:fixType" minOccurs=
"0"/>
150 <xsd:element name=
"sat" type=
"xsd:nonNegativeInteger" minOccurs=
"0"/>
151 <xsd:element name=
"hdop" type=
"xsd:decimal" minOccurs=
"0"/>
152 <xsd:element name=
"vdop" type=
"xsd:decimal" minOccurs=
"0"/>
153 <xsd:element name=
"pdop" type=
"xsd:decimal" minOccurs=
"0"/>
154 <xsd:element name=
"ageofdgpsdata" type=
"xsd:decimal" minOccurs=
"0"/>
155 <xsd:element name=
"dgpsid" type=
"gpx:dgpsStationType" minOccurs=
"0"/>
157 <!-- you can add your own privately defined trkpt elements at the end of the trkpt -->
158 <xsd:any namespace=
"##other" minOccurs=
"0" maxOccurs=
"unbounded"/>
160 <xsd:attribute name=
"lat" type=
"gpx:latitudeType" use=
"required"/>
161 <xsd:attribute name=
"lon" type=
"gpx:longitudeType" use=
"required"/>
170 <!-- you can add your own privately defined elements at the end of the GPX file -->
171 <xsd:any namespace=
"##other" minOccurs=
"0" maxOccurs=
"unbounded"/>
173 <xsd:attribute name=
"version" type=
"xsd:string" use=
"required" fixed=
"1.0"/> <!-- version 1.0 -->
174 <xsd:attribute name=
"creator" type=
"xsd:string" use=
"required"/>
178 <!-- Other types used by GPX -->
180 <xsd:simpleType name=
"latitudeType">
181 <xsd:restriction base=
"xsd:decimal">
182 <xsd:minInclusive value=
"-90.0"/>
183 <xsd:maxInclusive value=
"90.0"/>
187 <xsd:simpleType name=
"longitudeType">
188 <xsd:restriction base=
"xsd:decimal">
189 <xsd:minInclusive value=
"-180.0"/>
190 <xsd:maxInclusive value=
"180.0"/>
194 <xsd:simpleType name=
"degreesType"> <!-- for bearing, heading, course. Units are degrees, true -->
195 <xsd:restriction base=
"xsd:decimal">
196 <xsd:minInclusive value=
"0.0"/>
197 <xsd:maxInclusive value=
"360.0"/>
201 <xsd:simpleType name=
"fixType">
202 <xsd:restriction base=
"xsd:string">
203 <xsd:enumeration value=
"none"/> <!-- none means GPS had no fix. To signify "the fix info is unknown, leave out the <fix> tag entirely -->
204 <xsd:enumeration value=
"2d"/>
205 <xsd:enumeration value=
"3d"/>
206 <xsd:enumeration value=
"dgps"/>
207 <xsd:enumeration value=
"pps"/> <!-- military signal used -->
211 <xsd:simpleType name=
"dgpsStationType">
212 <xsd:restriction base=
"xsd:integer">
213 <xsd:minInclusive value=
"0"/>
214 <xsd:maxInclusive value=
"1023"/>
218 <xsd:complexType name=
"boundsType"> <!-- bounding rect for data in file -->
219 <xsd:attribute name=
"minlat" type=
"gpx:latitudeType" use=
"required"/>
220 <xsd:attribute name=
"minlon" type=
"gpx:longitudeType" use=
"required"/>
221 <xsd:attribute name=
"maxlat" type=
"gpx:latitudeType" use=
"required"/>
222 <xsd:attribute name=
"maxlon" type=
"gpx:longitudeType" use=
"required"/>
225 <xsd:simpleType name=
"emailType">
226 <xsd:restriction base=
"xsd:string">
227 <xsd:pattern value=
"[\p{L}_]+(\.[\p{L}_]+)*@[\p{L}_]+(\.[\p{L}_]+)+"/>