RSS

haroblr

I CAN HAZ TUMBLR.

the tumble log of john haro: ex-java developer turned bobble head and weekend coder, ninja, poet, lover, walker of streets, and whacker of moles.

contact : sldkfjas@qwertogvasf.com

complaints: shut it

 

my main blahg is johnharo.net
Jan 21
Permalink

Derek Eder and Forest Gregg Hack ClearStreets in 12 hours

This app was hacked together with python, php, google fusion tables, javascript, html/css, and a humble batch script. Here’s how we did it:

1. We dug around in the Plow Tracker code and stumbled into the data feed of GPS plow locations. We pulled these dots.

2. In order to figure out which streets had been cleared, we needed to turn these dots into plow paths. Lukas Kabrt’s MatchGPX2OSM did the trick. It takes a series of GPS locations and snaps them to the street grid in order to calculate the most likely path taken by the vehicle. The street grid itself was provided by the thousands of unsung heroes at OpenStreetMap.

3. We then wrote a script to import this data into Google Fusion Tables, so we could display it using Derek Eder’s searchable map template. Finally, we styled the template and flipped the switch.

We’ll post the code on Github later. It will be embarrassing.

Racing against the upcoming storm, these guys hacked a useful snowplow tracker. It’s not perfect, but it’s “done”.

Posted via email from John Haro’s Blahg | Comment »