Sunday, 28 April 2013

What is going on here?

The chart illustrates the alignment of buildings in the OSM database, for the British Isles. The trace of each building was divided into line segments, and the orientation of each segment to due north was calculated. Then the lengths of segment were totalled according to their orientation, and the result plotted as shown above.

If buildings were arranged randomly you would expect the plot to be more-or-less circular: with roughly equal lengths of the building perimeter heading in every direction. Clearly life isn't as simple as that.

What the chart suggests is:

  • A relatively high proportion of buildings are oriented along the main points of the compass: North-South and East-West. Hence the spikes at the top and bottom, left and right.
  • There is a second, smaller, cluster of walls that run roughly 15 degrees (anti-clockwise) off the main points of the compass. Lets say EENE, WWSW
  • There is a tendency to align buildings so that longer walls run roughly East-West and shorter walls run roughly North - South. Hence the oval shape in the chart, with the major axis running horizontally, and the minor axis running vertically.
The question is, why?

Specifically: I loaded an extract of OSM data covering the British Isles into a Postgres / Postgis database. I split ways that define buildings into individual line segments (the straight lines between each node). I calculated the orientation of each line segment using the ST_Azimuth function. All of this was based on the original WGS84 projection. I calculated the length of each segment by transforming the projection to OSGB 1936, and using the ST_Length function to get the length in metres. Totals were summed in the Postgres query, and I plotted the results in Excel. 

For what it's worth, I've tried this with various man-made features (roads, hedges, etc). The east-west orientation seems pretty common. So far I've only found the spikes on the main points of the compass for buildings.


lyx said...

One reason might be that churches are usually built with their main axis from east to west, and newer buildings around them would often follow that orientation. Another reason might be that building on an east-west axis gives you one south front where you could place large windows to get a maximum of sunlight.

Anonymous said...

My guess would be it is due to the sun. A East-West wall, will give you the ability to have a large south facing window, which is often desirable for buildings, especially residential homes.

It might be interesting to see, if this bias is less in hot countries, where a south facing window is perhaps less desirable

Unknown said...

That's definitely because of planning according to sunlight (to maximize natural sunlight during the day when it's on the south mostly and minimize direct heating from sun when it's low on the east/west during morning and evening).

Robert said...

I think the "spikes" are easily explicable through perhaps rounding etc. in an editor. I think it's a technical artifact.

As for the general trend, I'd be interested to see what other countries look like, perhaps ones nearer or further from the equator.

And countries with/without building imports.

Anonymous said...

"The lengths were totalled"

I think this is misleading. It skews towards churches, large buildings which are easily mapped, and are aligned.

Instead, you should make a graph showing the distribution. H

ow many buildings are aligned according to which orientation.

Anonymous said...

Solar orientation, how does it work?

Frederik Ramm said...

I think that the oval shape of your plot comes from the fact that you computed the angles with ST_AZIMUTH on un-projected coordinates. Do the OSGB projection before you compute the angle and you should end up at more of a circle.

gom1 said...

Brilliant - thanks to all. It is a projection problem (with Azimuth).

I knew re-projection was needed for length, But I hadn't twigged that it was also needed for Azimuth.

On reflection I should have done ,but there you go.

Many thanks. Now on to the next level.

Barry Rowlingson said...

Here's the same plot for New York: