Author Topic: Adding Waypoints to a GPX file  (Read 3785 times)

Hillbilly

Adding Waypoints to a GPX file
« on: 25 June, 2013, 07:19:09 pm »
Naive question.

I am putting together GPX tracks (not routes) for my two calendar events. 

In the past, I've not included markers for where controls, infos etc are.  But I want to this year, in order to make the files more helpful (ie no need to dig out routesheet when a control might be close...)

Can anyone suggest how to add these to the track.  I have used BikeHike to create the tracks in the past, but open to suggestion for alternative software that might make it possible to add the info.

Re: Adding Waypoints to a GPX file
« Reply #1 on: 25 June, 2013, 07:39:56 pm »
If you're not afraid of notepad then have a look at the GPX file that Manotea created for the Ditchling Devil.

The start of the track bit looks like this:-

Code: [Select]
  <trk>
    <name>LDDCal13</name>
    <extensions>
      <gpxx:TrackExtension xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
        <gpxx:DisplayColor>Magenta</gpxx:DisplayColor>
      </gpxx:TrackExtension>
    </extensions>
    <trkseg>
      <trkpt lat="51.437601959332824" lon="-0.230627059936523"/>
      <trkpt lat="51.436700820922852" lon="-0.224618911743164"/>
      <trkpt lat="51.428074836730957" lon="-0.223588859662414"/>
      <trkpt lat="51.426315307617188" lon="-0.222473060712218"/>
      <trkpt lat="51.42524242401123" lon="-0.217280387878418"/>
...

The waypoints are added as waypoints like:-

Code: [Select]
  <wpt lat="51.112701538950205" lon="-0.630297996103764">
    <time>2011-07-11T08:42:40Z</time>
    <name>Chiddingfold</name>
    <cmt>Coxcombe Lane</cmt>
    <desc>Coxcombe Lane</desc>
    <sym>Flag, Red</sym>
    <extensions>
      <gpxx:WaypointExtension xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
        <gpxx:DisplayMode>SymbolAndName</gpxx:DisplayMode>
      </gpxx:WaypointExtension>
    </extensions>
  </wpt>

These can simply be plugged in to the GPX file before the <trk> opening tag.

I think Manotea creates his GPX files in some Garmin tool. I tend to do mine by hand.
"Yes please" said Squirrel "biscuits are our favourite things."

Feanor

  • It's mostly downhill from here.
Re: Adding Waypoints to a GPX file
« Reply #2 on: 25 June, 2013, 08:34:21 pm »
I've just had a play with bikehike, and it can do just what you want.

Whack in your route as usual, and then use the 'Add coursepoint' link.
Whack it down where you want.
Set the type to 'generic', and give it a name, like 'C1-Anytown'

When you 'Save Route' as a GPX Track, the resulting file looks like this:

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
 
<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="bikehike.co.uk" version="1.1"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">

  <wpt lat="57.099190" lon="-2.262380">
    <ele>0</ele>
    <name>C1-Anytown</name>
    <sym>Waypoint</sym>
    <type>Generic</type>
  </wpt>

  <trk>
    <name>bikehike course</name>
    <trkseg>
      <trkpt lat="57.101580" lon="-2.257590">
       <ele>73.88</ele>
       <time>2013-06-25T20:27:02Z</time>
      </trkpt>
   etc etc....
 


I think this will do what you want.
The Coursepoints export as simple Waypoints in the GPX file, with the name you specify.

Name the waypoints so they make sense when truncated on a small screen.

Control_1 -The Gravedigger's Arms, Town A
Control_2 - The Dog's Bollox, Town B

may all be truncated to :

Control_
Control_

Which is not usefull!

Re: Adding Waypoints to a GPX file
« Reply #3 on: 26 June, 2013, 11:56:11 am »
Download 'Tyre toTravel' for free.