Author Topic: Spreadsheet --> GPX?  (Read 4275 times)

Spreadsheet --> GPX?
« on: 16 July, 2010, 09:03:06 am »
Here’s a question – please excuse the length of the explanation:

I recently purchased a Garmin Edge 205 from a fellow YACFer, and am slowly getting to grips with its navigational features (Garmin don’t document these things very well, do they?  :facepalm:)

I’ve just about straightened out how to download routes created on BikeHike, and this seems to work a treat – so much so that I definitely want to take it with me on holiday in September with some stored routes ready to roll. The problem is, those stored routes will be off-road in the High Atlas, so plotting them on BikeHike is out. I have a printed list of Lat/Long coordinates for each piste that I want to ride, but have yet to find an easy way to convert that into a GPX file…

Does anybody know of a program or website which will allow me to type in the waypoints (say, into a spreadsheet), convert that into a GPX file and download it to the Edge?
Life is too important to be taken seriously.

Chris N

Re: Spreadsheet --> GPX?
« Reply #1 on: 16 July, 2010, 09:15:23 am »
The basic format of a GPX file is very simple:

Code: [Select]
<?xml version="1.0"?>
<gpx version="1.1"
creator="Bikely - [url=http://www.bikely.com]Bike Trails, Paths & Routes From Over 40 Countries at Bikely.com[/url]"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="[url=http://www.topografix.com/GPX/1/1]GPX 1.1 Schema Documentation[/url]
http://www.topografix.com/GPX/1/1/gpx.xsd">
<metadata></metadata>
<rte>
<name>BREV-1</name>
<rtept lat="51.62796" lon="-2.6765"><name>AO-STA</name></rtept>
<rtept lat="51.62838" lon="-2.67753"><name>A1-L</name></rtept>
<rtept lat="51.62771" lon="-2.67912"><name>A2-RT</name></rtept>
<rtept lat="51.63013" lon="-2.68151"><name>A3-RT</name></rtept>
<rtept lat="51.63043" lon="-2.68124"><name>A4-L</name></rtept>
</rtept>
</rte>
</gpx>

It would be easy to type your own Lat/Longs directly into a gpx file in Notepad.

This is a part of a route (the Brevet Cymru audax) with named routepoints that works on the eTrex series of GPS.  Not sure if it works on the Edge.

(there's something funny going on with the <gpx version> data, something to do with the URLs in the the file and the forum software.  I don't know if these are necessary for the GPX file or not)

andygates

  • Peroxide Viking
Re: Spreadsheet --> GPX?
« Reply #2 on: 16 July, 2010, 09:25:42 am »
If you're typing anyway, I'd enter the points into Google Earth.  It takes about as long and in addition to sensible export options, you end up with a visualisation, which means it's easy to spot a wildly daft entry.

Manually entering coordinates is typo / silly entry hell, so viz is good. :thumbsup:
It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

Re: Spreadsheet --> GPX?
« Reply #3 on: 16 July, 2010, 09:36:13 am »
If you're typing anyway, I'd enter the points into Google Earth.  It takes about as long and in addition to sensible export options, you end up with a visualisation, which means it's easy to spot a wildly daft entry.

Manually entering coordinates is typo / silly entry hell, so viz is good. :thumbsup:

Aye, I envisaged uploading the route to somewhere to preview it for that reason...

I didn't realise that you could enter points directly into Google Earth - will install it and have a play later...
Life is too important to be taken seriously.

inc

Re: Spreadsheet --> GPX?
« Reply #4 on: 16 July, 2010, 10:07:50 am »


Does anybody know of a program or website which will allow me to type in the waypoints (say, into a spreadsheet), convert that into a GPX file and download it to the Edge?


Change your spreadsheet into a .csv list and gpsbabel should convert it to a .gpx file  or any other format including GE formats. I do this the other way to get .gpx into an OS mapping application with a closed file format.

andygates

  • Peroxide Viking
Re: Spreadsheet --> GPX?
« Reply #5 on: 16 July, 2010, 10:23:33 am »
Change your spreadsheet into a .csv list and gpsbabel should convert it to a .gpx file  or any other format including GE formats. I do this the other way to get .gpx into an OS mapping application with a closed file format.

Really? That's ever so cool.

Might make it more attractive to type them inna spreadsheet and viz in GE afterwards. 

Ambassador! With the number of ways to skin this cat, you are really spoiling us.

It takes blood and guts to be this cool but I'm still just a cliché.
OpenStreetMap UK & IRL Streetmap & Topo: ravenfamily.org/andyg/maps updates weekly.

mattc

  • n.b. have grown beard since photo taken
    • Didcot Audaxes
Re: Spreadsheet --> GPX?
« Reply #6 on: 16 July, 2010, 10:43:36 am »
The basic format of a GPX file is very simple:

Code: [Select]
<?xml version="1.0"?>
<gpx version="1.1"
creator="Bikely - [url=http://www.bikely.com]Bike Trails, Paths & Routes From Over 40 Countries at Bikely.com[/url]"
xmlns="http://www.topografix.com/GPX/1/1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="[url=http://www.topografix.com/GPX/1/1]GPX 1.1 Schema Documentation[/url]
http://www.topografix.com/GPX/1/1/gpx.xsd">
<metadata></metadata>
<rte>
...
...
</gpx>


Does the header actually need all those fancy XML URLs? Will anything break if you just use:

Code: [Select]
<gpx version="1.1" >
<rte>
...
Has never ridden RAAM
---------
No.11  Because of the great host of those who dislike the least appearance of "swank " when they travel the roads and lanes. - From Kuklos' 39 Articles

Re: Spreadsheet --> GPX?
« Reply #7 on: 16 July, 2010, 12:07:35 pm »
Thanks Peeps!  :thumbsup:

A few options to try, there.

I've also come across this site, which looks like it might do it all for me... Anybody any experience of this one?
Life is too important to be taken seriously.

inc

Re: Spreadsheet --> GPX?
« Reply #8 on: 16 July, 2010, 12:40:07 pm »
Thanks Peeps!  :thumbsup:

A few options to try, there.

I've also come across this site, which looks like it might do it all for me... Anybody any experience of this one?

It is just a gpsbable web frontend. Gpsbabel is available as a gui for all OSs

Re: Spreadsheet --> GPX?
« Reply #9 on: 18 July, 2010, 09:39:20 am »
Although not to any great detail, Bike Hike and other sites such as Bike Route Toaster enable road planning in North Africa.

May be enough to get the main route points if nothing else

Re: Spreadsheet --> GPX?
« Reply #10 on: 18 July, 2010, 10:25:10 am »
Ambassador! With the number of ways to skin this cat, you are really spoiling us.

We should be doing it in perl then. ;D

TIMTOWTDI

I would have gone the GPSBabel way, but I routinely use it to reduce the number of points from my Active 10 (slowest sampling is once every 4 seconds, and most web site won't accept a days worth of GPX at that resolution!)
Actually, it is rocket science.
 

Re: Spreadsheet --> GPX?
« Reply #11 on: 19 July, 2010, 05:20:54 pm »
Thanks for the suggestions so far!  :thumbsup: I'm still struggling, though...  :-[

Change your spreadsheet into a .csv list and gpsbabel should convert it to a .gpx file  or any other format including GE formats. I do this the other way to get .gpx into an OS mapping application with a closed file format.

Well, I tried this and GPSBabel said it had converted the file successfully. So I tried to upload it to a mapping site (BikeHike) to review it and transfer the track to my GPS, only to get a 'file invalid' error.  :-\  I suspect that it must be something to do with how I'm formatting the input data on th espreadsheet - can anybody add some detail for me? Do I need headers? Lat/Long in decimal degres or degrees and minutes? etc, etc?

So, anyway, then I tried:

If you're typing anyway, I'd enter the points into Google Earth.  It takes about as long and in addition to sensible export options, you end up with a visualisation, which means it's easy to spot a wildly daft entry.

But I must be going senile, 'cause I'm buggered if I can see a way of entering the information into Google Earth...  :'(
Life is too important to be taken seriously.

inc

Re: Spreadsheet --> GPX?
« Reply #12 on: 19 July, 2010, 10:24:37 pm »

Well, I tried this and GPSBabel said it had converted the file successfully.espreadsheet - can anybody add some detail for me? Do I need headers? Lat/Long in decimal degres or degrees and minutes? etc, etc?


It was a while ago since I last needed to do it so I just looked at and old file and the spreadsheet is like this

52.31351, -2.91277,    in column A, and descending, no headers and in decimal, this is as a text file called doc.csv and it converts fine to a gpx .

Re: Spreadsheet --> GPX?
« Reply #13 on: 20 July, 2010, 08:10:17 am »
Ta! Will give that a whirl!  :thumbsup:
Life is too important to be taken seriously.

frankly frankie

  • I kid you not
    • Fuchsiaphile
Re: Spreadsheet --> GPX?
« Reply #14 on: 20 July, 2010, 12:15:04 pm »
Does the header actually need all those fancy XML URLs? Will anything break if you just use:
Code: [Select]
<gpx version="1.1" >
<rte>
...

Some programs are fussier than others.
Bikely will open this (not even an xml file header, tsk tsk):
Code: [Select]
<gpx>
  <rte>
    <rtept lat="52" lon="-1"/>
  </rte>
</gpx>
or did last time I tried - whereas Mapsource would want at least this:
Code: [Select]
<?xml version="1.0" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="Fred Bloggs" version="1.1">
  <rte>
    <rtept lat="52" lon="-1"/>
  </rte>
</gpx>
when you're dead you're done, so let the good times roll

Re: Spreadsheet --> GPX?
« Reply #15 on: 20 July, 2010, 09:56:39 pm »
I used a mapping garmin las t year in N-central Morocco. There were then at least 4 different maps for Maroc you could load into Mapsource on your computer, modify and then drag into gps. None were of city nav quality - when I left Ceueta / Mellila (on CNEu as Spanish enclaves) was like falling off the map into a black hole. Contours were useful, I had 20 m (over the German sites basemap, with some OSM) but 5 m intervals would be better where youare going as there wont be much other detail. Maybe some French or Spanish MTB sites for DL tracks ?. May be worth aggregating everything as you can find as you can turn off layers that dont add detail on gps. This time of year blistering days, near freezing nights...

Re: Spreadsheet --> GPX?
« Reply #16 on: 21 July, 2010, 09:36:51 pm »
Just to clarify: the Edge isn't a mapping GPS and I don't have Mapsource. Plus the routes in question are Off-road, so no online mapping software will show the details necessary to plot the route...

I gave up trying to find a package or site that would do it in the end, and reverse-engineered a file I'd successfully created for a local ride. From that, I've produced a spreadsheet which will take the input Lat/Long data and generate each line of code via simple concatenation. That, pasted into a text editor, forms the GPX file which I can then transfer to the Edge via BikeHike....

'Tis a bit of a ball-ache, but I can live with it for this one trip.   8)

All I need to do now is work out how many routes I can store before leaving...

Thanks for all the suggestions!  :thumbsup:
Life is too important to be taken seriously.