TrailCam

Guides

How to add a waypoint to a GPX file

You are back home, looking at the map of a walk you recorded, and there is one spot worth flagging that the track itself does not mark — the gate that was easy to miss, the spring that was actually running, the junction where a sign was down. The track has the shape of the walk already. What it does not have, by default, is a way to say "and right here, this mattered." Adding that is a small, separate edit, and it is worth knowing what it actually touches before you make it.

The short answer

Open the GPX file in a GPX editor — GPX Studio is a free one that runs in a browser — click the spot on the map, and add a waypoint with a name. Save, and the file now carries both the original track and the new waypoint side by side. For a file you are comfortable opening as plain text, the same result comes from typing a short <wpt> block in by hand, as long as it sits outside the existing <trk> element rather than inside it.

Why a track does not already have this

A recorded track is an ordered list of points logged automatically as you moved — nothing in that list was ever meant to say "this particular point matters more than its neighbours." A waypoint is a different kind of thing entirely: a single, standalone location someone marked on purpose, with a name attached, unconnected to any sequence. The two live in the same file format but serve different jobs, which is exactly why adding a waypoint after the fact is a real edit rather than a setting you toggle on.

This is also why the marking has to happen afterwards, working from the finished file, rather than during the walk. A phone recording a track is asking Core Location for a stream of positions and writing each one down; it has no way to reach back into that stream and single out a specific point, days or weeks later, once you have decided which one deserved a name.

Doing it in a GPX editor

This is the route worth taking for almost everyone. A tool such as GPX Studio opens the file, draws the existing track on a map, and lets you click anywhere on that map to drop a new point, type a name for it, and save the result as a GPX file again. Because the editor is generating the underlying XML for you, there is no tag to get wrong and no risk of touching the track itself by accident — the track is drawn as a reference, not something the tool needs you to edit.

GIS software such as QGIS does the same job with more control if you are already comfortable with it, but for a single waypoint on a single walk it is more tool than the task calls for.

Doing it by hand in a text editor

Because GPX is plain text XML, a waypoint can be typed in directly. It looks roughly like this, sitting as its own element rather than nested inside the track:

<wpt lat="46.1234" lon="7.5678"><name>Spring, running</name></wpt>

The latitude and longitude are the two numbers that matter — pull them from the point on the track nearest to the spot you want to mark, or from a map that shows coordinates on tap. The <name> is what a receiving app will usually show as the label. An elevation can go in the same way if you have it, but it is optional; a waypoint with just coordinates and a name is a complete, valid one.

Where this element goes in the file matters. A GPX file with a track is structured as one or more <wpt> elements, each standing alone, followed by a <trk> element containing the recorded points. A new waypoint belongs alongside the existing <wpt> elements if there are any, or directly under the root <gpx> tag if there are none — never inside <trk> or <trkseg>, which are reserved for the sequence of recorded points and will confuse a reader expecting an ordered track if a stray waypoint ends up inside them.

What actually breaks the file when you edit it by hand

  • An unclosed tag — typing <wpt ...> without the matching </wpt>, or leaving off a closing angle bracket, is enough to make the whole file invalid XML rather than just the new point wrong.
  • A stray ampersand or angle bracket inside the name — XML treats those characters as syntax, so a name like "Miller & Sons Bridge" needs to be written as "Miller &amp; Sons Bridge" or the file stops parsing at that point.
  • Dropping the new element inside <trk> or <trkseg> by mistake — the waypoint may still be there technically, but some readers only look for <wpt> elements outside the track structure and will not show it.
  • Saving from a word processor instead of a plain text editor — smart quotes, rich formatting, or a non-plain encoding can all end up in a file a GPX parser expects to be nothing but plain XML.
  • Swapping latitude and longitude, or mixing up a negative sign — a plausible-looking pair of numbers can still place the waypoint on the wrong continent if the two values are reversed.

Where TrailCam fits in

TrailCam records a route as a continuous track and pins a photo, a video clip or a voice note to the exact point where you captured it while you are still out there — that pinning happens live, against the moving track, rather than as something added to the file afterwards. Adding a standalone waypoint to an already-exported GPX file, for a spot you only decided mattered once you were home, is the kind of edit a GPX editor handles rather than something built into the recording itself. TrailCam can bring the edited file back in afterward, since it imports GPX as well as exporting it. Export is GPX 1.1 or CSV, for a single route or your whole history, as part of the optional TrailCam Pro upgrade; the app itself is free to download.

Questions

Does adding a waypoint change the recorded track?
No. A waypoint is a separate element in the file, standing on its own with no connection to the track structure. Adding one leaves every recorded point, and the shape of the line, exactly as it was.
Can I add more than one waypoint to the same GPX file?
Yes. A file can hold any number of waypoints alongside a single track, each one independent of the others, so marking several spots on the same walk is just repeating the same edit.
Do I need special software to add a waypoint?
Not strictly — GPX is plain text, so a text editor works for a single addition if you are careful with the syntax. A free browser-based GPX editor removes the risk of a typo breaking the file, which is the easier route for most people.

Recording your own routes

TrailCam is an iPhone app that records your route with GPS, keeps video clips, photos and voice notes pinned to the spot where you took them, and exports the result as GPX 1.1 or CSV. It is free to download.

Download on the App Store