What is a GPX file?

GPX file sampleIn any discussion of routes, navigation or GPS devices, you have probably seen people mentioning ‘GPX files’. GPX is shorthand for GPS eXchange Format and is a type of file that’s really helpful to anyone who loves the outdoors, and is the most popular way of saving and exchanging routes.

What’s in a GPX file?

You can actually open a GPX file in any text editor, and you’ll get something like the image here. While this looks complex, all most people need to know is that it is a list of precise locations, in order, that make a up a route for walking, running, cycling or any other activity. This route can then be placed on top of a map for printing or following on screen.

Using a GPX file – with a mapping application

If you use a mapping application such as our own OS getamap you can use a GPX file to follow routes created by others, or to create your own routes for saving or sharing.

Create a route from a GPX file by first saving the route on to your hard drive or USB stick. You can then import the route. Look for an option labelled ‘Import Route’ or ‘Import GPX file’. You then should be able to see the exact planned route on screen, allowing you to review, print or edit as needed.

Create a GPX file from a route by drawing the route on screen. You will be able to export the route as a GPX file and import it into a different mapping application or to a GPS. As it’s a simple text file, you can also easily email it to others. Even if they use a totally different mapping application or different brand of GPS, they should still be able to open it.

Using a GPX file – with a GPS Device

Most GPS devices designed for outdoor sports and navigation can both create and use GPX files. The great thing about the universal nature of a GPX file is that different brands of device, with different maps loaded can all use the same GPX file.

Use an existing GPX file by loading it on to the device. Check your manual for details, but this normally means connecting the device to your computer by USB cable or Bluetooth, then sending the file to the device. The new route will then appear in the saved routes list on the device, and when active you will be able to follow it. Basic devices without on-screen mapping will generally just show an arrow to point to the next ‘waypoint’ (usually the next turning or fork) while more advanced ones will display the route on a map as well.

Create a GPX file by activating the ‘Record Trail’ or similar function. Every few seconds the GPS device will log where you are, and at the end of your trip the file can be exported back to your computer, usually by connecting it via a cable or Bluetooth and finding the file in the memory. You can then load the file into your favourite mapping application to check the distance covered, time taken and altitude profile, or share it with your friends or online.

What else is a GPX file good for?

GPX files can contain a time for each point and therefore the route as a whole. This is really useful for comparing your performance with your previous best or with others, and is a favourite of runners and cyclists.

Miniature GPS loggers can be attached to wildlife and pets. These create GPX files and can be used to understand more about animal behaviour – or just to find out where your cat is getting its second dinner from.

Technical stuff…

GPX files are a type of XML file initially designed for use by GPS devices, but now used more widely for exchanging route information between different devices and systems.  There is an official schema currently at version 1.1 that describes how GPX files should be constructed.

Most of the problems with GPX files come from various manufacturers who add additional information that is not compatible with all devices and programs that can use GPX files, or GPS files that contain a large number of individual points.

This will often mean that you cannot open a GPX file created on one device or program in another. There are some desktop and online tools that will try to tidy the files, and there is always the option of manually editing them useing a plain text editor, such as Notepad in Windows or TextEdit on Mac.

You may also like

Meet the team: Mark Greaves
Is Britain on the move?
When GPS fails…could you navigate with a paper map and compass?
What is IPX waterproofing?

24 Responses

  1. Tim

    “What else is a GPX file good for?” – geo tagging photos is one use many people don’t think of. Some cameras have GPS built in, but many still don’t. However most (if not all) cameras store the date/time a picture was taken, so software like Nikon’s ViewNX can use the GPX file to work out where the user was at a particular time, and thus add a geo tag to the photo.

    1. The easiest way is using our OS Maps app and desktop version. In the app, turn on route recording as you start. Once finished, save your route to the route list. This will sync to the desktop version, so you can see select your route from the saved routes list and see it displayed on the standard map (as well as 25K and 50K if you are a Premium user)

  2. Sam

    Hi, I’m trying to export a GPX route from OS mapping to an email but it keeps sending it to Route Buddy that I had installed as a free trial and no longer need it as the OS mapping system is great. I’ve tried to delete the Ap but it still keeps trying, any ideas how to resolve this? I am a Premium user on OS

    1. If this is from the web version, it’s due to a file association being set up that says ‘always open GPX files with this program’. These can sometimes get confused, but you can manually override them – GPX files are actually plain text file so can be set to open in Notepad. Have a look at this support page for Windows: https://support.microsoft.com/en-us/help/18539/windows-7-change-default-programs

      If it’s in the app, the file associations can be set in a similar way – see here for details: https://www.howtogeek.com/howto/43135/how-to-change-the-default-application-for-android-tasks/ The fastest way, however, is often uninstalling and reinstalling the app that you do want to use that file type, which overrides and previous settings. If you do this with OS Maps you will need to dre-download any offline maps and favourite routes.

  3. Hi Jonathan
    I am trying to obtain map data that I can use on my website and merchandise like shirts and similar. I have used garmin to record the routes and have then been able to export as gpx. I am struggling to find someone who will licence map data that i can then use. Garmin are not interested; OS not come back to me (yet); I am not really able to work through the technical spects of OpenStreetMaps. How hard does this have to be? or am I missing something? any thoughts welcome

  4. Peter Cook

    I am planning a walking holiday in Saxony/Bohemia next year. I have found a source of .gpx files for routes but am I right in thinking the OS maps app only works for the UK?

  5. Chris Needhasm

    Hi. I have exported a route I have created as a gpx file from the OS application. However, the file has saved as .gpx.xml and my Garmin doesn’t appear to recognise this. Am I doing something wrong here? Many thanks for any help here. Regards Chris.

    1. You need to change the extension to just .gpx. On Windows this can be a bit tricky to do, as extensions are hidden, but there is an option to show them. When saving a GPX file, you have to ensure the ‘file of type’ is either blank or set to GPX, as otherwise your computer will probably try to save it as another file type, which won’t work on your Garmin.

  6. Susie

    Hi I don’t seem to be able to export my routes. The button is there but doesn’t seem to do anything. Thanks Susie

  7. Roddie Grant

    It is disappointing that OSMaps strips out the title and description of waypoints when importing one of its own .gpx files. I had thought that exporting a route as a .gpx file, editing the route name and filename and then re-importing would be a quick way of duplicating a route, so that I can make different versions of a basic route. That does still work, but the loss of the titles and descriptions is frustrating. Is there any way of retaining them?

    [Jocelyn, thanks for the reply on another blog entry about the snap-to feature]

    1. Jocelyn

      Roddie, thanks for your query. Among other things this is something that our developments are looking in to, however unfortunately I cannot offer a timescale. I apologise for any inconvenience, Jocelyn

  8. Katie Nurton

    Hi Jonathan
    Forgive my ignorance, but starting at absolute basics, I’m cycling through France and have the route but with this gpx…xml file …. can I move this onto my iPhone and attach it to the front of the bike or is this a bad idea due to battery usage etc etc..? If indeed it’s possible. I’d like to be able to see the route in more than just an arrow showing the way forward so maybe buying a gps device is not such a good idea for me. Or maybe I just print out the maps and use a hard copy… sorry to be such a dunce!

    1. OK – some quick suggestions!

      The GPX file on it’s own is just data – it needs to be plugged in to some sort of mapping app to show the route line or even just turns. You need an app that works offline, and has maps for France, which rules out both ours and Google maps. There are several others out there – for road cycling you can probably use a free one using Open Street Maps. I’ve used ‘MapFactor GPS’ on an Android tablet for driving in France. While it shows roads well, off-road tracks are often missing.

      There’s two problems with using a mobile phone or tablet – battery life and durability. If you use the GPS all the time, it drains the battery quickly, as does having the screen on, so it’s not likely to last a full days’ ride unless you also have an external battery pack. They are also not particularly durable or waterproof without an extra case – but you can get these, often with handlebar mounts.

      Dedicated GPS devices are tougher, and some have really good battery life or replaceable batteries. They also tend to be technical and harder to use. However, you can get maps of France for almost all GPS devices, including our own new ones, and they all accept route files, generally in GPX format. If you decide to go down this route practice a bit to get used to how the device functions before heading off. The OS Velo GPS has maps of France available through Two-Nav and is designed to be straightforward to use, and with a 10-hour battery life in normal use. You would just copy the GPX files on to the devices, and they will show up as routes in the routes list.

      Lastly, don’t discount paper maps – they are simple and robust. The biggest problem is working out where you are! They also are too big to easily mount on handlebars, but you can get handlebar mounted map cases that at least allow you to show a smaller section. If your maps show lat/long you can use a really simple GPS app just to confirm your position, and a compass to check bearings as needed.

  9. Philip Robinson

    Hello. I’m trying to export a GPX file of a route out of the OS online software I’m been subscribing to for a few years. I used to be able to do it easily.
    However, recently when I press the Export GPX key it tries to open it as a PDF without a software or save choice and of course doesn’t actually open/save it. All the previous routes I’ve exported to my laptop for uploading to a Suunto running watch have also been converted to PDF. Please can you help?
    Thanks. Fell Running Phil

    1. It sounds like some other program has changed the file associations for GPX files, making them attempt to open in the wrong program. You’ve not said which type of computer or browser you use, but here’s a couple of links for Chrome on PC – other browsers and operating systems are similar. https://ccm.net/faq/36268-google-chrome-how-to-clear-auto-opening-settings https://www.lifewire.com/how-to-change-file-associations-in-windows-2624477. Send an email to customerservices@os.uk with more details if you are still stuck!

  10. Anthony Pipes

    Hi. A quick question if I may.

    I know how to create a route, export as a GPX file and save to my GPS.

    Problem is (particularly when ‘snapping-to-route’ is that I end up with too many waypoints for my GPS to be able to load up the full route.

    Is there a way round this that I am missing or do I just need to create routes with not so many waypoints?

    I think my Garmin units are both limited to 250 waypoints per route.

  11. Pingback : GPX Comes To StreetFix – Kevsoft RISC OS Software

  12. Max

    Hi, I’ve tried exporting the GPX file for a couple of routes found of your website; however, the file is downloaded in XML format, which isn’t accepted by my mapping apps (Komoot, Garmin). Is there a way to download an actual GPX file? Thanks, Max

Leave a Reply

Your email address will not be published. Required fields are marked *

Name* :

Email* :