iA


AfTerFibre – GitHub, KML, and finally a plan

by Steve Song. Average Reading Time: almost 4 minutes.

The idea for AfTerFibre is simple enough. Distribute the load of gathering information on terrestrial fibre optic cable projects in Africa by creating an online resource that anyone can contribute to. When I conceived of this project, I just assumed there would be an easy way to this. After all, we have Wikipedia, Ushahidi, Fusion Tables, and loads of rapidly growing Open Source GIS initiatives.

But none of them seemed to quite fit the model we were looking for. Lots of GIS tools allow you to add individual points, Ushahidi-style but I could discover none that facilitated the uploading of an entire map in vector format with associated metadata. Initially we hoped that Fusion Tables might serve this perhaps but in the end it seemed we were bending it in ways it was not meant to be bent.

More than that, I wanted AfTerFibre not to just be a map but an historical record of infrastructure development as well. I wanted people to be able to see the map evolve.

Rufus Pollock of the Open Knowledge Foundation has been a real help. He pointed me at the GeoJSON standard which seemed ideal for representing a combination of vector and meta information in a way that could be easily understood by other applications. He also helped explore the potential of storing the data in the CKAN TheDataHub which is evolving as a cloud service for Open Data. Rufus helped develop some code for rendering the AfTerFibre data stored in TheDataHub in Google Maps. This worked and was a great step in the right direction but I was still left with the problem of  how to easily integrate the KML files being traced in Google Earth with meta information about the cables.  This was a step I had to carry out manually prior to uploading data to TheDataHub.

While this was going on, I decided to start uploading KML files for the maps I had traced to GitHub to be able to organise and store the KML files in manner that allowed for their updating individually. GitHub is a popular cloud service for hosting software development projects.  Any serious software project uses some kind of revision control system to manage the evolution of software code in a sensible way.  GitHub was never designed for KML but GitHub can manage revisions for any data really and it has the virtue of being quite easy to use as revision control systems go as well as having some useful social features built-in.  This worked remarkably well. It is my first serious attempt to use GitHub and I really like it.  Have a look.

At this point I was still stuck though. Rufus had set me on the right path but has more than 100% of his time taken up with the Open Knowledge Foundation and I clearly needed help. Happily fate intervened at that point and I had a message from Greg Mahlknecht saying he had a little free time and was happy to help out. In case you don’t know Greg, among other things, he is he author of the excellent global undersea fibre optic cable map known as Greg’s Cable Map.

Greg took a look at GitHub repo and the GeoJSON standard and proposed a simple solution. Store the metadata in Description field of the cables vectors in KML using a simple “fieldname : data” format that separates the fieldname from the data with a colon with each new line being a new field. With the metadata stored in the KML file, it becomes possible to extract the data directly from the GitHub repository. And voila. Thanks to GitHub, we get a history of cable updates along with who updated the cable info as well as all the handy tools that come with GitHub, dynamic tarballs of the whole dataset, RSS feeds for update, fine-grained control for managing updates, etc.  In addition, it means that people need only one tool, Google Earth, to create a cable map.

It seems so simple in retrospect but so do all elegant solutions.

So what does this mean? It means that updating the AfTerFibre map is as simple as submitting a KML file to the GitHub repository. I’ll post instructions in the next week for exactly how to do that including how to trace maps, format the metadata, etc. I am very excited about this because it makes participation so much easier.

Oh, and before I forget. Here’s the map! It isn’t beautiful yet but it will be. Right now the beauty is all inside. Heartfelt thanks to Rufus and Greg for digging me out of the GIS hole I dug.  We’ll continue to update AfTerFibre data on the TheDataHub as well.

 

read original post on Steve Song's Site