Importing your own GPX

Tracknotes (the web upload page and the mobile "+" button) turns a GPX file into a trail guide: a map, an elevation profile, a waypoint list and a plan calculator. This page explains exactly what the importer does with your file, so you can prepare GPX that works well and understand the "Worth knowing" notes it shows after an upload.

The same code runs in the browser, on the phone and in the project's own build, so a file imports identically everywhere.

What goes in

Nothing is uploaded to a server unless you choose to share the route with the community. The file is processed on your device and the result is stored locally (IndexedDB in the browser, the app's documents directory on mobile). The other optional network calls are elevation backfill and the points-of-interest search (below).

Step by step

1. Tracks and waypoints are read

2. The trail is named

In order of preference: the name you type on the import screen, then <metadata><name>, then the first track's <name>, then "Imported trail".

3. Tracks are classified by name

Each track's name is matched (case-insensitively) against these patterns:

Name contains… Becomes
Alt (as a word), Alternative, Detour, Reroute an alternate route
ST: (at the start), Spur, Side Trip a side trip
Terminus: (at the start), or Terminus as a word an alternative trail end
anything else part of the main route

The first pattern that matches wins, in the order of the table: a track already named as an alternate stays an alternate even if the word "terminus" appears in it too.

So a file with Day 1, Day 2, Day 3, Side trip: Summit, Alt: High route and Terminus: Chief Mountain produces a three-leg main route, one side trip, one alternate and one alternative trail end.

Alternates and side trips are drawn on the map and listed as variants. They are matched to the main route at both ends (within 500 m) so the guide can show where they leave and rejoin; waypoints within 200 m of a variant are attributed to it. One that reaches the route at one end only is read from that end, whichever way it was drawn, so its waypoints are numbered from the place it leaves the trail.

An alternative trail end is a different way of starting or finishing the walk — a second border monument, a different trailhead — where the far end is deliberately nowhere near the route. It is matched at one end only: whichever end of the track is nearer the main route becomes the junction (so the track works drawn either way round), the other end is left where it is, and no rejoin is looked for. Put a waypoint of <type>endpoint</type> at the far end and the guide names the place the route ends at. It is listed with the side trips and marked Terminus, and it adds nothing to the trail's distance.

4. Main-route tracks are chained into one line

If more than one track is classified as main route, they are joined by geography, not file order: starting from the first track in the file, in the direction it is drawn, the importer repeatedly adds whichever remaining track has an end closest to either end of the route so far, reversing tracks where that closes the gap. A track that fits before the first one is put in front of it, so the first track is never turned round. A gap of more than 100 m between two legs is reported ("…m gap between "Day 2" and "Day 3"") — the route is still built, with a straight line across the gap.

Gotcha: two tracks that overlap or run parallel (say a recorded track and a planned one) will both be treated as main route and chained into a route that walks the trail twice. Delete one, or name it as a side trip or alternate.

5. Big tracks are thinned

Tracks over 5,000 points are simplified (Douglas–Peucker, keeping the shape) down to about 5,000 before anything else is computed, so distances, the profile and waypoint positions all agree. A second, lighter copy of around 3,000 points is made for drawing the map. The report says "simplified" when this happened; distances are unaffected in practice.

6. Elevation is cleaned

7. The route is checked for doubling back

The importer looks for stretches where the main route retraces itself for 2 km or more and reports them: "The route doubles back on itself for 5.2 km at the end of the route". This is advice, not a problem — a walk into town and back out is a legitimate part of many trails, so nothing is changed automatically. Those kilometres do count twice in the trail length, and any waypoint on the retraced stretch appears twice in the list (the second copy gets a distinct id).

If the section is really a side trip, move those points into their own <trk> named Side trip: … and re-import; step 3 will then lift it off the main route.

A loop that finishes where it started is not doubling back: meeting your own start again is how a circuit ends, so it is not reported unless you also walk part of the way out and back (an access track to the loop, say).

8. Waypoints are placed on the route

Each waypoint is snapped to the nearest point of the main route. Waypoints within 500 m of the route get a km position and show in the list and on the profile; anything further away is kept as "off-trail" (on the map, not in the distance list). The report gives both counts. On a loop, a waypoint at the trailhead is listed once, at km 0, not again at the finish.

9. Waypoints are given a type

A waypoint's type is the whole reason the guide can plan: it decides the icon, whether the point counts as water, and whether it counts as a place to buy food. The types the guide understands are campsite, hut, water, water-tank, town, resupply, food, accommodation, caravan-park, trailhead, road-crossing, inlet-crossing, side-trip, mountain, beach, endpoint, poi, and waypoint for "not categorised".

The type is decided by the first of these that produces an answer:

  1. The GPX <type> element, taken as-is and never overridden. If your file says <type>campsite</type>, that is the type — including a word of your own the guide has never heard of, which is kept verbatim and shown with a tidied-up label.

  2. A prefix on the name, which is then stripped from the name:

    Prefix Type Prefix Type
    C: campsite TH: trailhead
    W: water CP: caravan park
    WT: water tank IC: inlet crossing
    H: hut ST: side trip
    T: town M: mountain
    F: food S: / E: start / end point

    A space works instead of the colon (C Long Gully), and road crossings are the space form only: R Bogong High Plains Rd. The delimiter is required, which is why Campsite Area and Eastern Access are left alone rather than being read as C- and E-prefixed.

  3. A built-in list of Australian trail towns (Alice Springs, Walhalla, Pemberton, Quorn and about two dozen others) → town. This outranks prefixes, so Mt Hotham is a town rather than a mountain.

  4. Words anywhere in the name — see below. Imported files only.

  5. Otherwise the waypoint is left not categorised, rather than guessed at.

Types guessed from the name

Most GPX files in the wild use none of the conventions above: they just have names like Wallaby Creek Campsite or Coles Supermarket. So for a file you import, the guide reads the name for these words. (Trails built into the app skip this step — their waypoints are already categorised by hand, and guessing would only add noise.)

Words in the name Type
caravan park, holiday park, tourist park caravan park
road crossing, highway crossing, hwy crossing road crossing
side trip side trip
inlet crossing inlet crossing
water tank, rainwater, tank water water tank
drinking water, potable water, water source, water point, water tap, water pump, water trough, waterhole, soak, bore, trough, tap water
campsite, camp site, campground, camping area, camping ground, tentsite, tent site, bush camp, free camp campsite
hut, shelter, refuge hut
hotel, motel, hostel, lodge, B&B, bed and breakfast, guesthouse, backpackers, cabin, resort, pub, tavern accommodation
general store, corner store, village store, store, post office, food drop, food cache, food parcel, supermarket, grocery, roadhouse, bakery, takeaway, kiosk, cafe, deli, IGA, Foodland, Coles, Woolworths food
resupply resupply
trailhead, trail head, track head, car park, carpark, parking trailhead
summit, trig point, trig, peak, Mt, Mount mountain
lookout, viewpoint, waterfall, rest area, picnic area, picnic table, toilet point of interest
beach beach
trail start, trail end, route end, end point, terminus, start, finish start / end point

Whole words only, plurals included, so Huts matches and Hutchinson does not; earlier rows win, so Caravan Park is not read as parking and Side trip: Mt Ossa is a side trip rather than a mountain. The name itself is never changed by this step — only a prefix is ever stripped.

Some words are deliberately not used, because in Australian place names they mean the wrong thing far too often: bare creek, river, spring, dam and well are not read as water (Falls Creek is a town, Spring Gully is a road), bare camp is not read as a campsite (Camp Road), and a town is never guessed from its name, because inventing a resupply would quietly shorten how much food the plan tells you to carry. A pub is filed as accommodation rather than food for the same reason: accommodation never counts towards resupply, so a guess can never make a food carry look shorter than it is.

The import report tells you how many waypoints were typed this way and how many are still uncategorised.

Fixing a category

Guessing from words is never going to be right every time, so on an imported trail's page you can set the category yourself: open a waypoint's row in the waypoint list and choose from the Category menu. The change is saved with the trail and is picked up by the plan calculator, the map icon and the water/food filters. Trails built into the app are read-only.

What the types are used for

Common words other people's files use are understood as aliases here even though the guide never writes them itself: a waypoint typed spring, creek, tap or bore counts as water, and one typed supermarket, store, roadhouse or post-office counts as resupply.

Places you leave the trail to reach

A town is often nowhere near the route: you leave at a road crossing and hitch, walk or catch a shuttle the rest of the way. A file can say so, by hanging a few extra fields off the waypoint that marks the turn-off:

<gpx xmlns="http://www.topografix.com/GPX/1/1"
     xmlns:tn="https://tracknotes.app/xmlschemas/gpx-waypoint/1">
  <wpt lat="38.4967" lon="-106.3244">
    <name>Salida</name>
    <type>town-access</type>
    <extensions>
      <tn:offTrailKm>35.4</tn:offTrailKm>
      <tn:accessMode>hitch</tn:accessMode>
      <tn:acceptsBoxes>true</tn:acceptsBoxes>
      <tn:store>full</tn:store>
      <tn:accessName>Monarch Pass (US 50)</tn:accessName>
    </extensions>
  </wpt>
</gpx>

A place you walk to (foot, or no mode and 5 km or less) is counted wherever the guide measures a walk:

A place you ride to is not walked, so it adds nothing to any of them: the ride is reported, never timed.

All six are optional and all six are read on import, so a hand-made file can describe a turn-off exactly the way the built-in trails do. They have to be direct children of <extensions>; anything the guide cannot read — an accessMode that is not one of the five words, an offTrailKm that is not a number — is left off rather than guessed at, and another program's <extensions> block is ignored. Nothing here changes the route: a turn-off is a point on the trail at the kilometre where you leave it, not the place itself.

There is no field for the way itself. The built-in trails also carry the line of each walk in, found over OpenStreetMap when the trail is built, so the map can draw it dotted from the route to the place. An imported GPX file has no such line, and none is made for it: the map shows the place where it is, without the dotted way in, and every distance and climb above still counts. The same goes for a route shared with the community, which keeps these six fields but never a line: the server rebuilds every shared route from its own coordinates, and a line it was handed is not something it can check. A .tracknotes.json file exported from the website is a copy of a trail already built, so it keeps any line the trail has.

10. Identity

Points of interest (optional)

Waypoints come from your file. Points of interest come from OpenStreetMap, and they are opt-in: on an imported trail's page, Find points of interest searches a 2 km-wide corridor along the whole route — the main line plus every alternate and side trip — for water, campsites, shops and other resupply, transport, and emergency services.

On the phone, a GPX imported in Tracknotes can search for its own: open the guide's map, tap the layers button (◫) and choose Find places along this route. The screen says how many requests the search makes, roughly how much data it will download and whether you are on Wi-Fi or mobile data before anything is sent; the search starts only when you tap Search OpenStreetMap. It runs the same corridor queries as the trail build, tries a second and third public Overpass server for any query the first one refuses, and cleans the results the way the bundled trails are cleaned (noise such as ordinary bus stops dropped, places that duplicate one of your waypoints folded into it, city stretches thinned). Cancel leaves the guide unchanged; if some areas get no answer the rest are saved and Retry the missed areas asks again for just those. The results are saved into the guide, so they work offline afterwards, and Remove points of interest on the same screen takes them out again.

Points of interest are kept separate from your waypoints. They are shown on the map, never merged into the waypoint list, and never counted by the plan calculator — an OSM tap is not a water source you have checked. Nothing about your file is changed by the search, and Remove points of interest deletes them again in a click. If a point turns out to matter, add it to your GPX as a proper waypoint and re-import.

Point-of-interest data is © OpenStreetMap contributors and is used under the Open Database License; the attribution is shown on the trail page whenever POIs are loaded.

Sharing with the community

Once a trail is saved, the upload page offers Share with the community (when the site is connected to the Tracknotes service). A shared route is listed for everyone on the website and in the app, grouped by country and region.

Anyone can open a community route's page, see it on the map and profile, and Save to my trails to plan with it like one of their own imports.

Reading the "Worth knowing" notes

Note Meaning What you can do
…m gap between "A" and "B" Two main-route legs don't meet Fine if the gap is a ferry/road transfer; otherwise fix the recording or add the missing leg
No elevation data in this file No <ele> values Use Fetch elevation, or export the file with elevation
Elevation looks noisy Ascent was cleaned (see step 6) Nothing needed; the cleaned figure is the one shown
The route doubles back on itself An out-and-back inside the main route Leave it if it's the walk; otherwise make it a Side trip: track
N waypoints off trail Further than 500 m from the route Move them closer, or accept they're map-only

Alongside these notes the report counts categorised from their names and not categorised — how many waypoints were typed from their words in step 9, and how many are still uncategorised and worth setting by hand.

Preparing a good file