Tiny houses in Bristol

Fri 14 April 2017

A while ago, I attended a hackathon in Bristol at the Knowles West Media Center. Without going into the details of the justifications, they were looking at gaps between houses in which you could fit a tiny house. They were using Adobe Illustrator to comb over Ordinance Survey maps, measuring the gap widths by hand.

I figured there should be a way to speed this up. I used Python and Shapely, and was able to come up with an algorithm to measure the gaps. The following shows the results.

Alt text

Another example: Alt text

Of course, there are a few odd cases: Alt text

I have added a bunch of attributes to the output (a shapefile), for example the minimum width, the maximum width, and the "quality" which is a number between 0 and 1, which represents how rectangular the shape is. Overall, this helps find the gaps, without too much human effort.