The Proceedings of the Institution of Civil Engineers: Municipal Engineer recently published my work on using crowd-sourced data to model Fecal Sludge Management in the settlement of Kibera in Nairobi, Kenya.
Improvements in the collection and treatment of sewage are critical to reduce health and environmental hazards in rapidly urbanising informal settlements. Where sewerage infrastructure is not available, road-based faecal sludge management options are often the only alternative. However, the costs of faecal sludge transportation are often a barrier to its implementation and operation and thus it is desirable to optimise travel time from source to treatment to reduce costs.
This paper presents a novel technique, employing spatial network analysis, to optimise the spatio- topological configuration of a road-based faecal sludge transportation network on the basis of travel time. Using crowd-sourced spatial data for the Kibera settlement and the surrounding city, Nairobi, a proof-of-concept network model was created simulating the transport of waste from the 158 public toilets within Kibera. The toilets are serviced by vacuum pump trucks which move faecal sludge to a transfer station, and from there a tanker transports waste to a treatment plant. The model was used to evaluate the efficiency of different network configurations, based on transportation time. The results show that the location of the transfer station is a critical factor in network optimisation, demonstrating the utility of network analysis as part of the sanitation planning process.
Download Paper (.pdf)
We’ve updated the PetaJakarta website with a video explaining how to add Tweets to the flood map.
Previously, in this blog post, I discussed the ways in which we’re tackling the infrastructure challenges in developing nations using open data. Below are the slides I presented at the first International Symposium for Next Generation Infrastructure. The work presented is a proof-of-concept model using data from Map Kibera to optimise a road-based sewage network. The great thing about using this data is that for the first time we can glean an insight into infrastructure provision in informal urban settlements, and examine methods to improve it.
The world is becoming more urban – so how do we ensure our infrastructure meets the social, economic and climatic challenges of the 21st century? This was the theme of the recent International Symposium for Next Generation Infrastructure (ISNGI) hosted by the SMART Infrastructure Facility, at the University of Wollongong. The symposium highlighted some of the great research going on in Australia and around the world to understand how we can make our cities and their infrastructure sustainable for future generations.
Sanitation Network Modelling Poster
But what about developing nations? How do we model infrastructure when there’s no data? Or when the system is changing so fast that traditional data collection techniques become redundant? How do we quantify the infrastructure requirements of a slum when it’s population fluctuates by 800,000 people annually? More importantly, how do you engage with that community to understand their needs?
One solution is to use open data and open tools. The world is becoming more connected, and crowd-sourced data offer, for the first time, an insight into infrastructure in some of the world’s poorest cities and informal settlements which have never before been mapped. The Map Kibera project is a really great example of this. In collaboration with colleagues from the UK, we built a prototype model to demonstrate the utility of data from Map Kibera and Open Street Map for spatio-topological network modelling, to optimise road-based sanitation for Kibera. I presented this work at ISNGI, and Ruth recently presented a poster of this work at the International Water Association Congress and Exhibition in Nairobi. We’ve demonstrated it’s possible – the challenge now is to make it work in the real world.
I recently discovered the GeoAlchemy2 project – a replacement for the original GeoAlchemy package, focused on providing PostGIS support for SQLAlchemy. The SQLAlchemy package is a “Python SQL Toolkit and Object Relational Mapper”. In a nutshell this means you can write Python classes and map them to PostgreSQL tables without the need to write SQL statements – pretty cool!
PostGIS is great for doing spatial stuff, but if you’re using it as back-end for a Python app then you can spend a lot of time writing Python wrappers around SQL statements, and even with the excellent Psycopg2 package this can be tricky. This is especially true if you’re using the OGR Python bindings to handle PostGIS read/writes.
Enter GeoAlchmey2. I’ve been experimenting with it for a week, in that time I’ve learnt this:
For developing geospatial Python apps with PostGIS, GeoAlchemy2 is nothing short of revolutionary.
You can call PostGIS functions in Python, which means you can use them (and the data) directly within your Python application logic. Here’s an example. The SQL statement below uses PostGIS to create a new line geometry between a point, and the closest point on the nearest line.
Now here’s a snippet from a Python script, performing the same process using GeoAlchemy2.
You’ll notice here that we’re actually calling our own Python function “make_link_line” during the query to create the new geometry. This exemplifies how we can move PostGIS objects around inside the script. Once the query runs we can access the returned data in our application from the row variable. Below is the complete script.
Nearest neighbour PostGIS and GeoAlchemy2 script:
The script above is just a simple example, but it shows how powerful GeoAlchemy2 is for embedding PostGIS objects and methods inside Python. I’m really looking forward to digging deeper into the functionality of GeoAlchemy2 and SQLAlchemy to integrate them within my own projects. Check out the official tutorials for more examples: https://geoalchemy-2.readthedocs.org/en/latest/#tutorials
As part of my PhD I had to produce a land cover map for the Greater London area. I derived a simple land cover classification using the UKMap Basemap (which I previously used to generate the 3D London map). Click on the image below to see a larger version (1.8Mb at 300dpi).
Land cover in the Greater London area
I created the layers using PostGIS tables for each land cover type, based on the Basemap’s Feature Type Code (FTC), which classifies land use based on the National Land Use Database. Using separate tables also significantly improved rendering performance in Quantum GIS (QGIS), which I used for the cartography. I was impressed by QGIS’ ability to process and render such a detailed data-set (the Basemap contains ~11 million polygons for London).
As I had a lot of spare time on my hands before Christmas I decided to build a bookcase as a present for my girlfriend (an avid book reader and collector). The design is based on ‘nomad style’ furniture, which doesn’t require nails or glue – I really liked the idea that it can be dismantled and easily transported. I got my inspiration from instructables.
The finished product
The bookcase dimensions are 90x65x21cm, based on my measurements of existing bookshelves we had. The biggest challenge was finding a timber merchant who stocked plain square edged (PSE) wood that was deeper than 19cm, I think anything less is a bit shallow for most books.
Apart from drilling holes to help chisel some of the joints, I managed to build it without any other power tools. The lid sits on four dowel pegs, and I finished the whole thing with a couple of coats of boiled linseed oil, which provided a lovely finish. I’m happy to say it was well received on Christmas day!
Here are some more photos I took during construction.
Searching for knot-free PSE.
Is it straight?
Work in progress
Cutting the first shelf tenon joint
The finished shelves
Cutting the holes in the uprights
Testing the shelves for fit
A surveyor’s dream