Qgis Problem Solved

7 07 2008

I’ve moved on to using the models I generated with Local Authority DfT and ONS statistics to predict which areas of the country are complete and incomplete. I used the model on Lower Layer Super Output Areas (LLSOAs) which have an average population of 1500 and variable areas. Using Qgis I wanted to create a ratio of OSM road length in an area divided by the length of road the model predicts. In this way areas that have a value of 1 are complete, values under 1 show that there is not as many roads in OSM as I would predict and are therefore incomplete. Unfortunately there are a few areas with values larger than 1, indicating that the model is under predicting the road length. After extracting OSM road length for every boundary using Qgis I used OpenOffice spreadsheet to apply the model to every boundary, the problem came in re-importing the data to the shapefile for use in displaying heat maps in Qgis. The only way my colleague could find, involved a serious amount of hacking and command line stuff, which I am not very fluent in. Luckily with a bit of a search I found this solution.

All of the attribute data for the shapefile (i.e. all the data apart from the coordinates) is contained in a dBASE (.dbf) database file. Now if you attempt to open this file up as a database file in OpenOffice, ie by right clicking on it and make you open with OpenOffice Base then it will load up in OpenOffice spreadsheet in the correct file format. Select Unicode (UTF – 8 ) as the character set in the pop-up window and you’re good to go. You can manipulate the data in whatever way you like just be sure to save it as the same file name in the same file format. Then when you import the shapefile to Qgis it will contain all of your new attributes and you can make some new fancy heat maps as I intend to do.

Pretty soon I hope to have some nice image outputs from Qgis  which will show which areas of the UK are complete and which incomplete. Keep checking back for that and ask as many questions as you can muster, I’m always interested to hear from readers.

3D graphs rock! – a more technical way to help with OSM completeness

26 06 2008

So I’ve been working with ONS and DfT stats for the past few days and come pretty close to insanity with the statistics before realising that the simplest models give the nicest results.

Have a look at these 3D graphs I’ve been working with. They show us nice and simply that the amount of roads in a boundary, depend on the land area of that boundary and on the population within the boundary. Kinda straight forward and what you might expect, but its good to get some concrete results.

Now onwards and upwards I plan to use these results to predict how many roads there should be within any boundary on OpenStreetMap and then compare that results to how many there actually are on OSM. If any one has any simpler ideas on measuring completeness, then let me know!