GPX is XML defined by an XML Schema from TopoGrafix. This page follows the
GPX 1.1 schema and the
GPX 1.0 schema, read
2026-11-12. Version 1.1 uses the namespace
http://www.topografix.com/GPX/1/1. Child elements must appear in the order
listed; all are optional unless marked.
gpx (root)
| Item | Type | Meaning |
|---|---|---|
@version | required, fixed 1.1 | Schema version. |
@creator | required string | The program or device that made the file. |
metadata | metadataType | About the file. |
wpt | wptType, any number | Waypoints. |
rte | rteType, any number | Routes. |
trk | trkType, any number | Tracks. |
extensions | extensionsType | Elements from other namespaces. |
metadata
| Element | Type | Meaning |
|---|---|---|
name | string | Name of the file. |
desc | string | Description. |
author | personType: name, email (@id, @domain), link | The person or organisation that made it. |
copyright | copyrightType: @author (required), year, license (URI) | Copyright and licence. |
link | linkType: @href (required), text, type (MIME type); any number | Related web pages. |
time | dateTime | When the file was made, in UTC (ISO 8601). |
keywords | string | For search engines. |
bounds | boundsType: @minlat, @minlon, @maxlat, @maxlon (all required) | Extent of the data. |
extensions |
Points: wpt, rtept, trkpt
All three are wptType.
| Item | Type | Meaning |
|---|---|---|
@lat | required latitudeType | Degrees, −90 to 90, WGS 84. |
@lon | required longitudeType | Degrees, −180 up to but not including 180. |
ele | decimal | Elevation in metres. |
time | dateTime | UTC time of the point. |
magvar | degreesType (0 to under 360) | Magnetic variation. |
geoidheight | decimal | Height of the geoid above the WGS 84 ellipsoid, in metres (as in NMEA GGA). |
name | string | The GPS name of the point. |
cmt | string | GPS comment, sent to the device. |
desc | string | Description for the user. |
src | string | Source of the data, such as a map or device. |
link | linkType, any number | Links about the point. |
sym | string | Symbol name shown on the device. |
type | string | A classification. |
fix | fixType | none, 2d, 3d, dgps or pps (military signal). none means no fix; absence means unknown. |
sat | non-negative integer | Satellites used. |
hdop, vdop, pdop | decimal | Horizontal, vertical and position dilution of precision. |
ageofdgpsdata | decimal | Seconds since the last DGPS update. |
dgpsid | dgpsStationType (0 to 1023) | DGPS station ID. |
extensions | Any elements from other namespaces (processed laxly). |
Routes and tracks
rte and trk share their first elements: name,
cmt, desc, src, link (any number),
number (GPS route or track number), type and
extensions. Then rte has any number of rtept,
and trk any number of trkseg.
trkseg holds trkpt elements in order, then
extensions.
Other types
The schema also defines ptType (@lat, @lon,
ele, time) and ptsegType (a list of
pt); no core element uses them.
Public extension schemas
Elements from other namespaces go inside extensions (GPX 1.1) and are processed laxly, so a reader
that does not know a namespace skips it. These schemas are published and their elements occur in real files.
Each was fetched from its public address on 2026-11-13 and is described from that text. Child elements must
appear in the order shown. Every Extensions child below is a sequence of any number of elements
from other namespaces, processed laxly, and is not listed again.
Garmin TrackPointExtension, versions 1 and 2
Namespaces http://www.garmin.com/xmlschemas/TrackPointExtension/v1 and
…/v2 (schemas at www8.garmin.com/xmlschemas/TrackPointExtensionv1.xsd and
…v2.xsd). The root element TrackPointExtension goes in the extensions
of a trkpt. Both versions say they replace the TrackPointExtension of GpxExtensions v3.
| Element | Version | Type | Meaning |
|---|---|---|---|
atemp | 1, 2 | double | Air temperature, degrees Celsius. |
wtemp | 1, 2 | double | Water temperature, degrees Celsius. |
depth | 1, 2 | double | Depth in metres. |
hr | 1, 2 | unsigned byte, at least 1 | Heart rate, beats per minute. |
cad | 1, 2 | unsigned byte, at most 254 | Cadence, revolutions per minute. |
speed | 2 | double | Speed, metres per second. |
course | 2 | decimal, 0 to 360 inclusive | Degrees clockwise from true north. |
bearing | 2 | decimal, 0 to 360 inclusive | Degrees clockwise from true north. |
Extensions | 1, 2 | Elements from other namespaces. |
Garmin GpxExtensions, versions 2 and 3
Namespaces http://www.garmin.com/xmlschemas/GpxExtensions/v3 and …/v2
(GpxExtensionsv3.xsd, GpxExtensionsv2.xsd). Each root element is meant for the
extensions of the matching GPX element. Version 3 defines five roots; version 2 only
WaypointExtension (without Address, PhoneNumber and Extensions),
RouteExtension (only IsAutoNamed) and TrackPointExtension
(Temperature, Depth).
| Root element (v3) | Goes in | Children, in order |
|---|---|---|
WaypointExtension | wpt | Proximity (metres, double), Temperature (degrees Celsius, double), Depth (metres, double), DisplayMode (SymbolOnly, SymbolAndName, SymbolAndDescription), Categories (one or more Category strings), Address, PhoneNumber (any number; token with optional @Category, such as Home or Work), Extensions |
RouteExtension | rte | IsAutoNamed (boolean, required), DisplayColor, Extensions |
RoutePointExtension | rtept | Subclass, any number of rpt, Extensions |
TrackExtension | trk | DisplayColor, Extensions |
TrackPointExtension | trkpt | Temperature (degrees Celsius), Depth (metres), Extensions |
Address: up to twoStreetAddress, thenCity,State,Country,PostalCode(all tokens, all optional),Extensions.rpt(autoroute point): optionalSubclass; @lat(−90 to 90) and @lon(−180 inclusive to 180 exclusive) are required.Subclass: hexBinary of exactly 18 bytes (36 hexadecimal digits).DisplayColor: one ofBlack,DarkRed,DarkGreen,DarkYellow,DarkBlue,DarkMagenta,DarkCyan,LightGray,DarkGray,Red,Green,Yellow,Blue,Magenta,Cyan,White,Transparent.
Garmin WaypointExtension, version 1
Namespace http://www.garmin.com/xmlschemas/WaypointExtension/v1
(WaypointExtensionv1.xsd), root WaypointExtension in the extensions of a
wpt. Same children, types and order as the v3 WaypointExtension above, up to
PhoneNumber, then two more before Extensions: Samples (int) and
Expiration (dateTime, UTC, the schema says it is the same as the creation timestamp).
Garmin PowerExtension, version 1
Namespace http://www.garmin.com/xmlschemas/PowerExtension/v1 (PowerExtensionv1.xsd).
One root element, PowerInWatts (unsigned short, 0 to 65535), for the extensions of a
trkpt.
Cluetrust GPXData 1.0
Namespace http://www.cluetrust.com/XML/GPXDATA/1/0 (www.cluetrust.com/Schemas/gpxdata10.xsd),
a mix-in for sport and geocaching devices. It declares these global elements, and its schema imports the
GPX 1.1 schema for the latitude and longitude types.
| Element | Type | Meaning |
|---|---|---|
hr | non-negative integer | Heart rate, beats per minute. |
cadence | non-negative integer | Cadence, revolutions per minute. |
temp | decimal | Temperature, degrees Celsius. |
distance | decimal with optional @sensor (wheel or pedometer) | Distance in metres, from GPS or a wheel sensor. |
sensor | empty, @kind required (wheel or pedometer) | Set when a sensor is present. |
dataPt | time (dateTime, required), ele (decimal), hr, cadence, temp, distance, sensor, in that order, all optional but time | Data with no position. |
run | sport (bike, run, other), programType (any simple value), laps (any number of lap) | A run, which encapsulates laps and summary information. |
course | index (int), laps (any number of lap) | A course downloaded to the device as a track; the schema says it always appears in a track. |
lap | see below | One lap. |
lap children, in order, all optional: index (int), startPoint and
endPoint (empty, @lat and @lon required, GPX latitude and longitude types),
startTime (dateTime), elapsedTime (float, seconds), calories (non-negative
integer), distance (float, metres), trackReference, summary (any number),
trigger, intensity (rest or active).
trackReference has optional startPoint and endPoint (non-negative integers:
indexes into the track) and optional @trackNumber (non-negative integer) and @trackName
(string). summary is a decimal with required @name (string) and required @kind
(max, min or avg). trigger holds any simple value, with required
@kind (manual, time, distance, location or hr).
TopoGrafix public extensions
Three public schemas from the authors of GPX, each in its own namespace under
http://www.topografix.com/GPX/ and published in several versions, each version a separate
namespace: gpx_modified 0.1, gpx_style 0.1 and 0.2, and gpx_overlay 0.1,
0.2, 0.3, 0.4 and 0.5 (all XSDs fetched 2026-11-13). In gpx_style and gpx_overlay, the
extensions children take elements from other namespaces under strict processing, unlike the
lax GPX element.
gpx_style/0/1(gpx_style.xsd): a different layout from 0.2, and it declares only types, no global elements.lineType:color,width,linecap(butt,round,square),dasharray,extensions.fillType:color,pattern,extensions.textType(the text is an element holding its own style):text(string),color,font,line,fill,align(left,center,right),vertical-align(top,center,bottom),pt(a GPX 1.1 point),extensions.fontType:family(string),size(decimal),weight(normal,bold),style(normal,italic),extensions.coloris hexBinary of 3 bytes;dasharrayis a string matching([0-9]+\s)*[0-9]+, such as20 10 30 10. All children are optional and ordered as listed; theextensionschildren are the lax GPX 1.1extensionsType.gpx_modified/0/1(gpx_modified.xsd): one element,time, the modification time (not creation time) of the element that holds it, a dateTime that must end inZ(UTC only).gpx_style/0/2(gpx_style.xsd): global elementsline,fill,text,alignandvertical-align.line:color,opacity,width(millimetres, decimal),pattern(string),linecap(butt,round,square),dasharray(one or moredashwith required decimal @markand @space, millimetres),extensions.fill:color,opacity,pattern,extensions.text:color,opacity,font,align(left,center,right),vertical-align(top,center,bottom),extensions.font:family(optionalfacestring, required @generic:serif,sans-serif,cursive,fantasyormonospace),size(millimetres, decimal),weight(normal,bold),style(normal,italic),text-transform(capitalize,uppercase,lowercase,none),extensions.coloris hexBinary of 3 bytes (RGB,FF0000is red);opacityis decimal from 0.0 to 1.0. All children are optional and ordered as listed.gpx_overlay/0/3(gpx_overlay.xsd; importsgpx_style): global elementslabel,polyline,points,ptandmax_scale(decimal: the largest map scale at which the parent is shown, for example 24000).label: an optional choice ofpoint(apt) ortranslate(@dx, @dyrequired, millimetres), thenrotate(degrees clockwise, 0 up to but not including 360),margin(@dx, @dy),label_text,derived_from(such asdescorarea),type,max_scale,gpx_style:text,gpx_style:line,gpx_style:fill,extensions.polyline:desc,type,max_scale,label,gpx_style:line,gpx_style:fill,extensions, then any number ofpoints.pointsholds any number ofpt;pthas @latand @lon(required, as GPX), optionaleleandtime.gpx_overlay/0/1(gpx_overlay.xsd; imports GPX 1.1 andgpx_style/0/1): types only, no global elements.textType: optionaltext(agpx_styletext) andextensions, with required @latand @lon(GPX 1.1 types).polygonType:text,line,fill(the 0.1 style types),points(a GPX 1.1 point segment,ptsegType),extensions.polylineType:text,line,points,extensions. All children optional and ordered as listed.gpx_overlay/0/2(gpx_overlay.xsd; importsgpx_style/0/2only, and defines its own latitude, longitude, degrees, point and extensions types): the same content as 0.3 as described above, with one difference: apolylineholds at most onepointselement (afterextensions), where 0.3 allows any number. Like 0.3 it has no GPX 1.1 import. Latitude is −90 to 90 inclusive, longitude −180 inclusive to 180 exclusive, androtateis 0 inclusive to 360 exclusive.gpx_overlay/0/4(imports GPX 1.1 andgpx_style/0/2): 0.2 plus images, and the global elementswidthandheight(decimal).labelgains optionalwidthandheightaftermax_scale.imageType(a type only; there is no globalimageelement in 0.4): an optionallink(GPX 1.1linkType), thenextensions, with required @latand @lon. Apolylinemay hold any number ofpoints(afterextensions).gpx_overlay/0/5(imports onlygpx_style/0/2, by anhttpsschemaLocation that the schema says must be https; GPX 1.1 types are copied in): 0.4 with a globalimageelement and an imagelinkthat is required (one) and is a locallinkType: optionaltextandtype(strings) with required @href(URI). The rest is as 0.4.
TopoGrafix private extensions, versions 0.1 to 0.5
Namespaces http://www.topografix.com/GPX/Private/TopoGrafix/0/1, …/0/2,
…/0/3, …/0/4 and …/0/5 (topografix.xsd in each folder), used by
ExpertGPS and other TopoGrafix products. The GPX manual shows the 0.2 namespace in an ExpertGPS file.
Versions 0.4 and 0.5 are listed after the table.
| Element | Versions | Content |
|---|---|---|
active_point | 0.1, 0.2: empty with @lat and @lon (required); 0.3: a GPX point (ptType) | The point used as the origin for distance and bearing calculations (0.3 wording). |
route_number | 0.1, 0.2 | decimal. |
color | 0.1, 0.2 | hexBinary (route colour). |
type | 0.2 | string (route type). |
leg | 0.1, 0.2 | name, desc, url (URI), urlname, all optional, in order. |
map | 0.2 | A scanned map with optional calibration. Required @url (URI); children in order, all optional: name, width and height (integers), any number of mappt (@lat, @lon, @x, @y, all required; a calibration point), forward and inverse (a projection: @a to @f, six required decimals). |
base_url | 0.3 | URI: base for resolving relative URLs in the file, like HTML’s base href. |
use_doc_style | 0.3 | boolean: use the styles in the document instead of the application’s. |
cased | 0.3 | boolean: draw a cased (outlined) line on the map. |
point_symbol | 0.3 | string: none, symbol or marker. |
selection_pt | 0.3 | A GPX point: the point of interest on a route or track. |
selection_range | 0.3 | pt_start then pt_end, both required GPX points. |
marker | 0.3 | Empty; required @category and @symbol (strings): a vector-based symbol. |
The 0.1 schema declares its own latitude and longitude types (−90 to 90 and −180 to 180, both inclusive) for
active_point; 0.2 and 0.3 use the GPX 1.1 types.
Versions 0.4 and 0.5 (topografix.xsd, fetched 2026-11-13) keep base_url,
use_doc_style, cased, point_symbol (none, symbol,
marker), selection_pt, selection_range (pt_start,
pt_end) and active_point (a GPX point) from 0.3, except that marker is empty
with one required @url (a string: a URL to a bitmap image such as a PNG with transparency; for
http://www.server.com/foo/Road_Signs/Stop.png the category is Road Signs and the symbol name Stop), where 0.3
had @category and @symbol. They add these elements, all global:
print_center_pointandimage_export_center_point: a GPX point, the centre of the last printed page or of the last exported image.print_scaleandimage_export_scale(int): the scale of the last print or image;image_export_widthandimage_export_height(int): size in pixels of the last exported image;print_orientation_landscape(boolean): true is landscape, false portrait.sym(string): the GPS symbol name, spelled as displayed on the GPS.legend: an entry in the map legend, with three required children in order:class(internal use, such aswaypointortrack),type(the waypoint or track type to draw) andname(the legend text, normally the same as the type, user-editable).override_color: hexBinary of 3 bytes (RGB); when present it overrides any line and fill colour fromgpx_style.ExtendedData: any number ofData, each with required @name(the key) and an optionalvalue(string), for arbitrary CSV or SHP data that fits no GPX element; a more constrained form of KML ExtendedData.pro_data_column: empty, with required @list(currentlywptorshp) and @name(the column); the order of these in the metadata is a hint to ExpertGPS about the user’s preferred column order.
Version 0.4 imports the GPX 1.1 namespace (without a schemaLocation) and uses its ptType; version 0.5 does
not import it and instead defines its own ptType (ele, time, required
@lat and @lon, with the GPX latitude and longitude ranges), copied from GPX 1.1. Otherwise the
two are the same.
Garmin schemas that are not GPX extensions
Garmin’s ActivityExtensionv1.xsd (ActivityTrackpointExtension,
ActivityLapExtension) and UserProfileExtensionv1.xsd were also fetched. They are
written for Training Center (TCX) files, not GPX (the first mentions the Training Center Trackpoint_t
and ActivityLap_t types), and name no GPX element to attach to; they are not described here.
GPX 1.0
Version 1.0, namespace http://www.topografix.com/GPX/1/0,
version="1.0", differs in these ways:
- No
metadataelement:name,desc,author,email,url,urlname,time,keywordsandboundsare children ofgpx. urlandurlnameinstead oflink.- Track points (
trkptonly) may havecourse(0 to 360 degrees, true) andspeed(decimal). - No
extensionselement, and nolinkon points, routes or tracks: elements from other namespaces (xsd:any namespace="##other", which means a namespace other than GPX’s and not “no namespace”) may appear directly at the end ofgpx,wpt,rteptandtrkpt, and inrteandtrkbefore the route points (rtept) and the segments (trkseg), afternumber;trkseghas none (read in the 1.0 schema, topografix.com/GPX/1/0/gpx.xsd, 2026-11-14, which corrects an earlier reading that put them after). - The children of
wpt,rteptandtrkptfollow one order in 1.0 too:ele,time, (course,speedintrkptonly),magvar,geoidheight,name,cmt,desc,src,url,urlname,sym,type,fix,sat,hdop,vdop,pdop,ageofdgpsdata,dgpsid. Ingpx:name,desc,author,email,url,urlname,time,keywords,bounds, thenwpt,rte,trk. - Degrees (
magvar,course) run from 0 to 360 inclusive (1.1 excludes 360).emailis a string that must match[\p{L}_]+(\.[\p{L}_]+)*@[\p{L}_]+(\.[\p{L}_]+)+, not 1.1’sidanddomainattributes. rteandtrkhave notypeelement:gpx10.xsdhas it commented out as “PROPOSED” (lines 68 and 120). They do havenumber(non-negative integer).versionis fixed to1.0andcreatoris required ongpx.latandlonare required on points, from −90 to 90 and −180 to 180 inclusive;dgpsidis 0 to 1023.