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">
5 <!-- Main GPX definition -->
7 <xsd:element name="gpx">
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">
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"/>
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"/>
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"/>
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"/>
50 <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
51 <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
54 <xsd:element name="rte" minOccurs="0" maxOccurs="unbounded">
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">
69 <xsd:sequence> <!-- elements must appear in this order -->
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"/>
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"/>
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"/>
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"/>
99 <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
100 <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
106 <xsd:element name="trk" minOccurs="0" maxOccurs="unbounded">
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">
121 <xsd:sequence> <!-- elements must appear in this order -->
122 <xsd:element name="trkpt" minOccurs="0" maxOccurs="unbounded">
124 <xsd:sequence> <!-- elements must appear in this order -->
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"/>
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"/>
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"/>
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"/>
156 <xsd:attribute name="lat" type="gpx:latitudeType" use="required"/>
157 <xsd:attribute name="lon" type="gpx:longitudeType" use="required"/>
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"/>
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"/>
174 <!-- Other types used by GPX -->
176 <xsd:simpleType name="latitudeType">
177 <xsd:restriction base="xsd:decimal">
178 <xsd:minInclusive value="-90.0"/>
179 <xsd:maxInclusive value="90.0"/>
183 <xsd:simpleType name="longitudeType">
184 <xsd:restriction base="xsd:decimal">
185 <xsd:minInclusive value="-180.0"/>
186 <xsd:maxInclusive value="180.0"/>
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"/>
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 -->
207 <xsd:simpleType name="dgpsStationType">
208 <xsd:restriction base="xsd:integer">
209 <xsd:minInclusive value="0"/>
210 <xsd:maxInclusive value="1023"/>
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"/>
221 <xsd:simpleType name="emailType">
222 <xsd:restriction base="xsd:string">
223 <xsd:pattern value="[\p{L}_]+(\.[\p{L}_]+)*@[\p{L}_]+(\.[\p{L}_]+)+"/>