Sg2.9
Convert GPS .csv files to Ill...
Recent RSS
Creator:  Graham van de Ruit
Date:  28. December 2011, 10:42

This script creates Illustrator paths and points from a .csv file exported from Garmin’s free BaseCamp software.

In BaseCamp, select any number of tracks and/or waypoints and go to File > Export > Export Selection. Select .csv as the file type and save a copy of this file in the same location as the script.

You’ll need to open the script and change the file name of the .csv file near the top, or save your .csv as “GPS Route.csv”.

You can run the script in a document of any dimensions. The tracks and points will be scaled to fit proportionally into the artboard bounds within a margin set in the script. The script will use the active style, so the points may be invisible until you apply some formatting to them. All tracks and points will be correctly labelled in the layers panel, so you can target them easily this way.

The waypoint objects created in the script have a “Symbol” property which is not used, but you could easily modify the script to take advantage of this (eg applying a style or using an appropriate symbol from the library).

I’d appreciate any feedback, and would love to hear if you find the script useful. If you have any trouble with it, I’d be happy to try to help out.

Re: Convert GPS .csv files to Illustrator paths
Date:  28. December 2011, 11:44

Hey,
Fast work! It looks cool, now all I have to do is buy a GPS so I can play around with it.

Re: Convert GPS .csv files to Illustrator paths
From:  Hubert Wah
Date:  1. April 2012, 04:27

Heyys,

I have changed the file name of the .csv file near the top of the script from 'Domboshawa.csv' to file name of the .csv in my scriptographer folder but it always pop out a error.

TypeError:Cannot read property "5" from undefined
at Scriptographer Scripts/GPS Track.js:31

Any advise?

Re: Convert GPS .csv files to Illustrator paths
Date:  1. April 2012, 10:35

Hi Hubert

I’ve tried changing the structure of the for loops from:

for(x in y)

to:

for(i = 0; i < y.length; i++)

The former has given me trouble in the past when needing to convert the x to a number value. So, try GPS Track 3.js. Apologies for all the versions—I haven’t worked out how to remove old attachments.

If that doesn’t work, my guess would be that your CSV is formatted differently from mine, for some reason. In that case, you’re welcome to send it through to me and I’ll see if it works for me and where the problem might be: grahamvdr (at) gmail.com.

Re: Convert GPS .csv files to Illustrator paths
From:  zedzero
Date:  23. July 2012, 08:09

Hey,

Thanks for the resource.

Unfortunately, I can't get it to work!

I'm trying to import a csv file that will create a path forming the coastline of a land mass.

I put the script here...

/Applications/Adobe Illustrator CS5/Plug-ins.localized/Scriptographer/Scripts/Examples/Scripts

and put the .csv file in the same location as the script, & changed the name in the script to match. But when I click the button... nothing!

Here is where I got the data from...

http://www.ngdc.noaa.gov/mgg/coast/tmp/19785.dat

which I saved as a csv file.

Any pointer would be really helpful!

Best regards

Pete

Re: Convert GPS .csv files to Illustrator paths
Date:  29. July 2012, 12:55

Hi Pete

I wrote the script to work with CSVs exported from Garmin’s Basecamp specifically. If your CSV does not follow the same structure that could explain why it isn’t working. If you send it through to me (grahamvdr [at] gmail [dot] com) I can have a look at it and see if it’s a problem with the script, and perhaps I’ll be able to update it to work with CSVs generated from different applications.

Sorry for taking so long to respond! I hope I’ll be able to help.

Graham

Re: Convert GPS .csv files to Illustrator paths
Date:  5. February 2013, 21:17

I’ve had an email from another user saying he’s getting the error “Cannot read property "5.0" from undefined” and so I spent some time looking into it. It seems his CSV didn’t have any text after the last line of his last track, and when my script was checking to see if the next line lead on from it, it caused an error. I’ve corrected this and attached the latest script as GPS Track 4.js. Let me know if you encounter any more errors—I haven’t done extensive testing.

As a quick workaround you can just add a blank row to the end of your CSV, but hopefully there won’t be any need to with this latest version.

I’ve also updated it to use a file open dialog instead of searching for “GPS Route.csv” in the script location, so you can save your CSV wherever you want and call it whatever you want!

Scripts
08.08.14, 15:24
15.05.14, 14:23
02.03.14, 19:16
18.11.13, 14:48
22.03.13, 03:05
22.02.13, 15:45
Posts
10.01.17, 16:37
19.02.16, 06:03
19.02.16, 06:00
17.01.16, 11:00
12.01.16, 13:10
25.11.15, 08:19