In an effort to make the world a better place, hackers all around Switzerland joined this years make.opendata.ch hackathon in Zürich and Lausanne. The goal was to use publicly available data, so-called OpenData and visualize it in a meaningful way so everyone is able to make sense of it.
Despite of having a french language deficit - it was a dark chapter in grammar school - i travelled all the way to EPF Lausanne which was absolutely worth it.
After the kickoff Florin, Frederic and I immediately started working on a project to improve the routes suggestion of traditional mapping applications such as Google Maps and OpenStreetMap by providing a way to add obstacles to a map and then calculate a new obstacle-free route to help people on tight schedules arrive on time. While we knew that large companies are working on that we were still looking for a hack to finish something usable until the deadline the day after.
The theoretical solution - The frontend would be a static website where the user can enter departure and destination location. This then would make an API call to the backend where the hacks are doing its’ part. The backend would consist of a webkit process running, controlled by PhantomJS. If a request gets issued PhantomJS loads Google Maps Directions with the start and end location, let the server-side webkit process render the page and then add all the obstacles via Lat/Long with a predefined icon which is easily distinguishable from the map itself. Next, PhantomJS creates a PNG-screenshot of the obstacles and route containing website. It starts the next process which parses the PNG pixel-by-pixel and looks if there is a blue line and an obstacle crossing. If so, make a circle of 300m radius around the obstacle and randomly add a Lat/Long coordinate, being part of the circle border, as a waypoint to the routes call of Google Maps. Then repeat the process above to check if the new route interferes with obstacles. If finally and obstacle-free route is found, return the details to the frontend.
During dinner, about three hours in, we came to the conclusion that it is just too much of a hack to spend valuable hacking time on, so we had to find something more suitable for the next day. Which we did in SwissMap.
I hereby thank the sponsors, hackers and especially the team behind the MAKE.OpenData project Andreas, Hannes, Oleg, Antoine, François, Frederic and Jeremy very much for making the event possible and inspiring us.
Amazing MAKE.OpenData projects others have built