Some details of these trails.
Kml2gpx.com: convert kml to gpx online. It’s free, simple and fast I am digging out some old mapped walks from dropbox and converting them to work on my site so this is handy.
I occasionally make simple mashup of of gpx, google maps and flickr photos of walks. I record gpx on the Trails app on my phone, take photos with the phone too as they are nicely geo tagged and flickr can use that information and provide in the API 1.
One of the things I noticed was that the GPX files can be pretty big, over a megabyte each. I know there was probably a lot of information in the file that was not needed to display the path on the map but was not sure of how to do so easily. I think I’ve used online services for this before. Finding a site, uploading a file and downloading is a lot of bother for something that I hope will be quick and simple. I also expect that the audience for the pages produced is one.
Having a look inside the gpx files I though that you could probably slim them down considerably, each point is recorded like this:
<trkpt lat="55.996687" lon="-4.389713"><ele>188.609</ele><time>2016-06-05T10:12:58Z</time><extensions><gpxtpx:TrackPointExtension><gpxtpx:speed>1.30</gpxtpx:speed><gpxtpx:course>206.37</gpxtpx:course></gpxtpx:TrackPointExtension><trailsio:TrackPointExtension><trailsio:hacc>5.00</trailsio:hacc><trailsio:vacc>3.00</trailsio:vacc><trailsio:steps>2</trailsio:steps></trailsio:TrackPointExtension></extensions></trkpt>
I am pretty sure all we need is:
<trkpt lat="55.996687" lon="-4.389713"><ele>188.609</ele></trkpt>
and that a regular expression could do the trick.
I don’t know anything about RegEx other than I’ve found it offered as a solution when googling text replacement problems but this:
replace: <extensions>.*?</extensions> with nothing
followed by replace: <time>.*?</time> with nothing
I am guessing I could combine these, but it didn’t take long to run through a few files using them in this crude form.
did the trick. My 1MB file was now 160KB
This works both in BBEdit and TextMate. TextMate struggled a bit with the size of the files.
This post will be of little interest to anyone but myself and might just fit in the suchlike bit of this blogs sub title.
Featured Image: two screenshots, layered. my own CC-BY.
I’ve blogged about some of the methods I’ve used before.
I am continuing to use ExifTool by Phil Harvey for geotagging photos. Is is a wonderful application that has many more features that the basic use I am making of it. Once installed it is simple to use even if you do not usually use commandLine stuff. A quick example using a mac:
- Photos in a folder on my desktop called ‘kilsyth hills’
- gpx track on the desktop
- Open the Terminal application (found in the Utilities folder)
- In the terminal you type: exiftool -geotag into the terminal, then drag the gpx track file onto the terminal window, followed by the folder of images, you end up with something like this:
exiftool -geotag /Users/johnjohn/Desktop/Lecket-hill.gpx /Users/johnjohn/Desktop/kilsyth hills
in the terminal window, all you need to do is hit return and the application runs through the photos and calculates the gps location of each from the time taken and the gpx track.
If then import the images into iPhoto you can click the info icon on a photos thumbnail to see something like this:
And this info will put the photos on the map if you upload them to flickr.
The application came in handy today when I was mapping yesterday’s walk
I am continuing to mess about with this stuff. The last walk I mapped and tweeted brought a ton of great geo information from Geography teacher Kenny73 who blogs at Odblog one post: Odblog: Cellspin in the field covers using cell phone gps and everytrail to produce maps like Ben Vane at EveryTrail and school grounds. The iPhone app I use for creating gpx tracks, trails is integrated with everytrail. This is a simpler way of creating map/gpx/photo mashups than mine but I’ll continue with mine for fun and a bit of flexibility (I can add sounds and video etc to maps). Some sort of everytails system would be easier to to use with a class.
Finally on the geo front I heard about the Eye-Fi Share Wireless 2GB SD Card has been added to the UK amazon store. It went out of stock almost immediately but its features include geotagging of photos! I am not sure if it used gps satellites for this of info about wireless networks to figure out the location, but if it is the former it will stay at the top of my wish list.
Update 02.08.09 On the ADE list David Baugh let me know The eye-fi explore uses triangulation of wireless access points and
mobile towers. not so useful for walks away from mobile and wifi coverage then.