gpx.rnc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322
  1. default namespace = "http://www.topografix.com/GPX/1/1"
  2. namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
  3. namespace rng = "http://relaxng.org/ns/structure/1.0"
  4. ## GPX schema version 1.1 - For more information on GPX and this schema, visit http://www.topografix.com/gpx.asp
  5. ##
  6. ## GPX uses the following conventions: all coordinates are relative to the WGS84 datum. All measurements are in metric units.
  7. start |= gpx
  8. gpx =
  9. ## GPX is the root element in the XML file.
  10. element gpx { gpxType }
  11. ## GPX documents contain a metadata header, followed by waypoints, routes, and tracks. You can add your own elements
  12. ## to the extensions section of the GPX document.
  13. gpxType =
  14. ## Metadata about the file.
  15. element metadata { metadataType }?,
  16. ## A list of waypoints.
  17. element wpt { wptType }*,
  18. ## A list of routes.
  19. element rte { rteType }*,
  20. ## A list of tracks.
  21. element trk { trkType }*,
  22. ## You can add extend GPX by adding your own elements from another schema here.
  23. element extensions { extensionsType }?,
  24. ## You must include the version number in your GPX document.
  25. attribute version { xsd:string },
  26. ## You must include the name or URL of the software that created your GPX document. This allows others to
  27. ## inform the creator of a GPX instance document that fails to validate.
  28. attribute creator { xsd:string }
  29. ## Information about the GPX file, author, and copyright restrictions goes in the metadata section. Providing rich,
  30. ## meaningful information about your GPX files allows others to search for and use your GPS data.
  31. ##
  32. ## elements must appear in this order
  33. metadataType =
  34. ## The name of the GPX file.
  35. element name { xsd:string }?,
  36. ## A description of the contents of the GPX file.
  37. element desc { xsd:string }?,
  38. ## The person or organization who created the GPX file.
  39. element author { personType }?,
  40. ## Copyright and license information governing use of the file.
  41. element copyright { copyrightType }?,
  42. ## URLs associated with the location described in the file.
  43. element link { linkType }*,
  44. ## The creation date of the file.
  45. element time { xsd:dateTime }?,
  46. ## Keywords associated with the file. Search engines or databases can use this information to classify the data.
  47. element keywords { xsd:string }?,
  48. ## Minimum and maximum coordinates which describe the extent of the coordinates in the file.
  49. element bounds { boundsType }?,
  50. ## You can add extend GPX by adding your own elements from another schema here.
  51. element extensions { extensionsType }?
  52. # elements must appear in this order
  53. ## wpt represents a waypoint, point of interest, or named feature on a map.
  54. wptType =
  55. # Position info
  56. ## Elevation (in meters) of the point.
  57. element ele { xsd:decimal }?,
  58. ## Creation/modification timestamp for element. Date and time in are in Univeral Coordinated Time (UTC), not local time! Conforms to ISO 8601 specification for date/time representation. Fractional seconds are allowed for millisecond timing in tracklogs.
  59. element time { xsd:dateTime }?,
  60. ## Magnetic variation (in degrees) at the point
  61. element magvar { degreesType }?,
  62. ## Height (in meters) of geoid (mean sea level) above WGS84 earth ellipsoid. As defined in NMEA GGA message.
  63. element geoidheight { xsd:decimal }?,
  64. # Description info
  65. ## The GPS name of the waypoint. This field will be transferred to and from the GPS. GPX does not place restrictions on the length of this field or the characters contained in it. It is up to the receiving application to validate the field before sending it to the GPS.
  66. element name { xsd:string }?,
  67. ## GPS waypoint comment. Sent to GPS as comment.
  68. element cmt { xsd:string }?,
  69. ## A text description of the element. Holds additional information about the element intended for the user, not the GPS.
  70. element desc { xsd:string }?,
  71. ## Source of data. Included to give user some idea of reliability and accuracy of data. "Garmin eTrex", "USGS quad Boston North", e.g.
  72. element src { xsd:string }?,
  73. ## Link to additional information about the waypoint.
  74. element link { linkType }*,
  75. ## Text of GPS symbol name. For interchange with other programs, use the exact spelling of the symbol as displayed on the GPS. If the GPS abbreviates words, spell them out.
  76. element sym { xsd:string }?,
  77. ## Type (classification) of the waypoint.
  78. element type { xsd:string }?,
  79. # Accuracy info
  80. ## Type of GPX fix."
  81. element fix { fixType }?,
  82. ## Number of satellites used to calculate the GPX fix.
  83. element sat { xsd:nonNegativeInteger }?,
  84. ## Horizontal dilution of precision.
  85. element hdop { xsd:decimal }?,
  86. ## Vertical dilution of precision.
  87. element vdop { xsd:decimal }?,
  88. ## Position dilution of precision.
  89. element pdop { xsd:decimal }?,
  90. ## Number of seconds since last DGPS update.
  91. element ageofdgpsdata { xsd:decimal }?,
  92. ## ID of DGPS station used in differential correction.
  93. element dgpsid { dgpsStationType }?,
  94. ## You can add extend GPX by adding your own elements from another schema here.
  95. element extensions { extensionsType }?,
  96. ## The latitude of the point. This is always in decimal degrees, and always in WGS84 datum.
  97. attribute lat { latitudeType },
  98. ## The longitude of the point. This is always in decimal degrees, and always in WGS84 datum.
  99. attribute lon { longitudeType }
  100. ## rte represents route - an ordered list of waypoints representing a series of turn points leading to a destination.
  101. rteType =
  102. ## GPS name of route.
  103. element name { xsd:string }?,
  104. ## GPS comment for route.
  105. element cmt { xsd:string }?,
  106. ## Text description of route for user. Not sent to GPS.
  107. element desc { xsd:string }?,
  108. ## Source of data. Included to give user some idea of reliability and accuracy of data.
  109. element src { xsd:string }?,
  110. ## Links to external information about the route.
  111. element link { linkType }*,
  112. ## GPS route number.
  113. element number { xsd:nonNegativeInteger }?,
  114. ## Type (classification) of route.
  115. element type { xsd:string }?,
  116. ## You can add extend GPX by adding your own elements from another schema here.
  117. element extensions { extensionsType }?,
  118. ## A list of route points.
  119. element rtept { wptType }*
  120. ## trk represents a track - an ordered list of points describing a path.
  121. trkType =
  122. ## GPS name of track.
  123. element name { xsd:string }?,
  124. ## GPS comment for track.
  125. element cmt { xsd:string }?,
  126. ## User description of track.
  127. element desc { xsd:string }?,
  128. ## Source of data. Included to give user some idea of reliability and accuracy of data.
  129. element src { xsd:string }?,
  130. ## Links to external information about track.
  131. element link { linkType }*,
  132. ## GPS track number.
  133. element number { xsd:nonNegativeInteger }?,
  134. ## Type (classification) of track.
  135. element type { xsd:string }?,
  136. ## You can add extend GPX by adding your own elements from another schema here.
  137. element extensions { extensionsType }?,
  138. ## A Track Segment holds a list of Track Points which are logically connected in order. To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data.
  139. element trkseg { trksegType }*
  140. ## You can add extend GPX by adding your own elements from another schema here.
  141. extensionsType = element * { text }*
  142. ## A Track Segment holds a list of Track Points which are logically connected in order. To represent a single GPS track where GPS reception was lost, or the GPS receiver was turned off, start a new Track Segment for each continuous span of track data.
  143. trksegType =
  144. # elements must appear in this order
  145. ## A Track Point holds the coordinates, elevation, timestamp, and metadata for a single point in a track.
  146. element trkpt { wptType }*,
  147. ## You can add extend GPX by adding your own elements from another schema here.
  148. element extensions { extensionsType }?
  149. ## Information about the copyright holder and any license governing use of this file. By linking to an appropriate license,
  150. ## you may place your data into the public domain or grant additional usage rights.
  151. copyrightType =
  152. # elements must appear in this order
  153. ## Year of copyright.
  154. element year { xsd:gYear }?,
  155. ## Link to external file containing license text.
  156. element license { xsd:anyURI }?,
  157. ## Copyright holder (TopoSoft, Inc.)
  158. attribute author { xsd:string }
  159. ## A link to an external resource (Web page, digital photo, video clip, etc) with additional information.
  160. linkType =
  161. # elements must appear in this order
  162. ## Text of hyperlink.
  163. element text { xsd:string }?,
  164. ## Mime type of content (image/jpeg)
  165. element type { xsd:string }?,
  166. ## URL of hyperlink.
  167. attribute href { xsd:anyURI }
  168. ## An email address. Broken into two parts (id and domain) to help prevent email harvesting.
  169. emailType =
  170. ## id half of email address (billgates2004)
  171. attribute id { xsd:string },
  172. ## domain half of email address (hotmail.com)
  173. attribute domain { xsd:string }
  174. ## A person or organization.
  175. personType =
  176. # elements must appear in this order
  177. ## Name of person or organization.
  178. element name { xsd:string }?,
  179. ## Email address.
  180. element email { emailType }?,
  181. ## Link to Web site or other external information about person.
  182. element link { linkType }?
  183. ## A geographic point with optional elevation and time. Available for use by other schemas.
  184. ptType =
  185. # elements must appear in this order
  186. ## The elevation (in meters) of the point.
  187. element ele { xsd:decimal }?,
  188. ## The time that the point was recorded.
  189. element time { xsd:dateTime }?,
  190. ## The latitude of the point. Decimal degrees, WGS84 datum.
  191. attribute lat { latitudeType },
  192. ## The latitude of the point. Decimal degrees, WGS84 datum.
  193. attribute lon { longitudeType }
  194. ## An ordered sequence of points. (for polygons or polylines, e.g.)
  195. ptsegType =
  196. # elements must appear in this order
  197. ## Ordered list of geographic points.
  198. element pt { ptType }*
  199. ## Two lat/lon pairs defining the extent of an element.
  200. boundsType =
  201. ## The minimum latitude.
  202. attribute minlat { latitudeType },
  203. ## The minimum longitude.
  204. attribute minlon { longitudeType },
  205. ## The maximum latitude.
  206. attribute maxlat { latitudeType },
  207. ## The maximum longitude.
  208. attribute maxlon { longitudeType }
  209. ## The latitude of the point. Decimal degrees, WGS84 datum.
  210. latitudeType =
  211. xsd:decimal { minInclusive = "-90.0" maxInclusive = "90.0" }
  212. ## The longitude of the point. Decimal degrees, WGS84 datum.
  213. longitudeType =
  214. xsd:decimal { minInclusive = "-180.0" maxExclusive = "180.0" }
  215. ## Used for bearing, heading, course. Units are decimal degrees, true (not magnetic).
  216. degreesType =
  217. xsd:decimal { minInclusive = "0.0" maxExclusive = "360.0" }
  218. ## Type of GPS fix. none means GPS had no fix. To signify "the fix info is unknown, leave out fixType entirely. pps = military signal used
  219. fixType = "none" | "2d" | "3d" | "dgps" | "pps"
  220. ## Represents a differential GPS station.
  221. dgpsStationType =
  222. xsd:integer { minInclusive = "0" maxInclusive = "1023" }