..works best on small screens!
8r4d
Nearby Trails | 12 days ago
8r4d An excuse for a Thursday #running adventure was connected to a drinks night out for the Kid’s 18th. A dozen people showed up for a six kick run and an evening at the pub.

At the risk of veering wildly off topic, I thought this would be a good post to update on a weird new feature I just added to this app. It’s a geo mapping function.

If I dig back through my instagram posts I notice that for about a year there I was obsessed with this little app that would add running metadata to a photo: run distance, elevation gain, and most particularly a little squiggly line representing the route you followed. This was all done with a fancy app and had lots of customization features. Oh, if only I was so fancy here.

I was thinking about this and considered that I could add the ability to upload a gpx file and make all that automatic. (A gpx file is the route data collected by my garmin watch, a series of geographic points and timestamps. Essentially my watch is just noting the time and location once every couple of seconds and building a long list that then gets uploaded and processed by more clever computers.)

I did some testing and then finally settled on a bit of code that does a couple things: it loads the first picture of a post as a background canvas, it does a bunch of computation on a gpx file that is uploaded through the same interface, it draws an elevation map on the bottom of the photo, prints the distance in the top left corner, and then paints the route map with elevation “heat” as a squiggly line in the top right. Then it saves the new photo back to the server as the next photo in the sequence. It does this all in a fraction of a second simply by uploading that file from my watch (or technically off strava.) The result is that one of the photos in a post now has an automagically generated gps map (sans actually map… y’know because privacy) layered onto it.

There is an example on this post.

I may update the style or content as I go, but the basic functionality is there, useful for plotting out particularly squiggly runs or, say, vacation walking tracks, or any other geo-mapped data.

  
8r4d-stagram