Github here: https://github.com/danlmarmot/kml-to-csv
Another hot day yesterday as the wind blew in from the desert, temperatures around 95F/36C. I finished my final packing, and then went through my resupply boxes and finished them all up too, then wondered what to do. It's too hot in the upstairs office to tidy, it's too hot and dry outside to clean the patio, so I decided I'd kill a few hours and put Halfmile's excellent PCT maps on my Garmin Oregon GPS--even though there are excellent apps for the iPhone and Android devices, I still like having nice maps on the GPS.
That was a fairly difficult problem to figure out, and "a few hours" turned into "several hours" as I hid downstairs in the AC (upgraded just last week in anticipation of a long hot summer.) It's not obvious how to make custom maps or load thousands of waypoints or tracks onto a Garmin handheld GPS, and I tried a dozen methods--making custom .IMG files, loading GPX directly, creating a custom points-of-interest file with pretty icons. Every one of the methods had problems--GPX files are limited to 999 waypoints on the Garmin, some apps didn't load comments, all had ugly icons. If I'm going to be staring at my GPS for the next five months, I want it to look as pretty on the trail as I do.
Finally, after dealing with all sorts of crufty Windows utilities and ancient Java applets and the like, I just decided to write my own parser, pull the info out of the KML, make a CSV file, add the icons. Then I attached the GPS, manually fired up the Garmin POI Loader, pointed it at the output directory, and it copied the custom POI file to the Garmin.
It all worked, and took me about an hour--and even better, I can now generate this single file in a few seconds. I should've just coded it all up myself in the first place; it's not difficult. The Github repo is at the top of the file, along with a screenshot.
It was a fun thing to dive into and puzzle out, and like a lot of coding problems it was best solved at 1am. I haven't been getting much sleep lately at all. I'm pretty anxious to get going, and this time I was at least able to put that nervous energy to a bit of good use.