Tuesday, November 02, 2010

How Do I Create My Maps?

I often ask myself how I create the maps I post for my trips. The answer is: it's complicated. I don't have a fast workflow to create the maps with my tracks but I like the results. Maybe in the future I'll automate something, for now it's a manually intensive process.

1- Pull the current GPX file from my Zumo. By the time I get around to pulling the current gpx it's usually in the archive with days and days of extra track data.

2- Decompose the GPX into daily files. I use Eclipse to edit the .gpx like an xml file because it is. It is slow due to the size of the files. This is the first process I should automate. I put each track tag on a separate line. Then I copy each day into it's own file keeping the xml and gpx outer tags. Then I strip out all the tags except the first, effectively combining all the tracks from one day into one .

3- Each daily file goes into GPS Visualizer to be converted to a kml file. I used to export to an image but I found a way to embed Google maps with the track data allowing me to zoom and pan as well as link to a full size Google map. Much more useful. There is also a way to export a Google map directly rather than go through the following kml process but that would have it hosted from gpsvisualizer and they clear out old maps every so often (nightly?).

3a- The settings I use when creating the kml:
General Map Parameters
Output file type: .kml (could save space with kmz)
Units: U.S.

Track Options (show advanced)
Colorized By Speed
Colorize max: 75 (or whatever the fastest I think I was going on the trip)
Legend: Yes
Show distance...: Yes
Max. points per track: 200 (important!)

The rest I pretty much leave alone.

4- With my new kml file I next go to Google Maps and login to My Maps. Then select Create new map. I give the map an interesting name and select Import. Now I can upload my kml file from my local system for permanent storage on the cloud. I've found that besides only accepting a 10MB file, only the first 200 track points are accepted. Thus the importance of having GPS Visualizer only export that number of points.

5- I change the maps to Terrain and select Link at the top right. The HTML to embed is close to what I need but I need to tweak the zoom level to fit the entire track so I select Customize and preview... I leave the Map size at Medium but in the preview I usually have to zoom out one level. From there I can copy the HTML and paste it into the Html editor in blogger.

Notes: Using Eclipse to parse the GPX sucks the life out of my laptop. I really need a lighter editor or a bigger computer to be doing that kind of manipulation. One thing that helps is to delete any tracks outside the window of my trip first. Still it's hard to work with and a small xml parser could do the job so I really should write something to do it for me.

Second, having a lot of maps on the page seems to slow it down and many trackpoints don't help. I have the impression using track colorization rather than speed would help but I find it interesting to see how fast I was going in different areas.

Finally, I've just realized I can now upload kmz files to Google Docs. This will allow me to avoid the 200 point limit and should make it easier to organize my maps. Also the track curves look smoother, not as jagged. I can put the link to the kmz file in the Google Maps search box and it will bring up the track. From there I can jump to step 5. I'll have to see what impact this method will have on page loading.

No comments: