OpenStreetMap Road Coverage in England

Peter Reed has been doing some excellent work comparing the Department of Transport measured road lengths by English county, and comparing them with the total lengths of roads in OpenStreetMap.

This has only recently become possible to do with spatial data purely in OpenStreetMap, because the English counties have now been completely added to the project. This last step was harder than it might seem because there is no freely available definitive source for boundaries in the UK (which is just plain odd.) Instead, it was necessary to use a combination of local knowledge, examining signs and council objects on the ground, and trace from out-of-copyright maps, to form the boundaries.

Peter’s choropleth map is excellent and deserves a wider audience, here is a smaller version of it (click through to see the large version, which may also have been since updated.)

osmcoverthumbChoropleth of OSM road coverage vs Department of Transport figures, by Peter Reed.

It is encouraging to see many areas at nearly (or over) 100% coverage, there are a number of reasons why coverage might be more than the Department’s own figures, due to more up-to-date information, counting of slip roads, and mis-tagging private roads as public on OSM, so the map’s figures should be taken with a pinch of salt.

The Welsh and Scottish county boundaries are not yet complete in OpenStreetMap so the coverage analysis cannot yet be completed.

Muki has also (with a student) done OSM road coverage analysis, using equal area blocks rather than county-based units.


Mapping Party and Mapzen Sneak Peek!

The next London mapping party is on Thursday evening, in Mayfair, the really posh bit of central London (you can tell its posh as it only has one bus route going through it.) See here for details and to signup.

What’s special about this one is that Cloudmade’s in-development mapping editor, Mapzen, might be being demoed. The screenshots look very interesting, this could be pretty cool.


Map Cake

One of my favourite bits from the State of the Map conference last weekend was when they bought out the cakes:


If you are familiar with London’s geographical layout, you might recognise the big green blob on the cake on the right as being Regent’s Park. I think my slice ended up being part of the waterfront in Amsterdam.

A random event? Not quite. When mapping parties are being organised, the most efficient way to ensure that the area in question gets good coverage from the different mappers on the day, is to look at the existing map and divide it up into sectors – mappers then bag one or more sectors that they will concentrate on. Such a map is known as a “cake” and each of the sectors are known as “slices”.

An an example, here’s the mapping party “cake” for the next London mini-mapping party that’s being held on Thursday evening, collecting POIs around King’s Road in the west of the city:

2, 4, 11 and 12 are alreay nabbed. If you fancy a slice, put your name down on the wiki page and then get mapping on Thursday evening!

Conferences OpenStreetMap

State of the Map 2009 Review


Just back from StateOfTheMap, the OpenStreetMap community’s international conference. I missed the first two conferences but made it along to this year’s in Amsterdam. I skipped the “business day” on Friday and joined the conference for the Saturday and Sunday, when it reverts to being a community conference.

My favourite talks were:

  • Andy Allan showing off some advance cartographic techniques that make “other” maps beautiful and how we could apply them to OpenStreetMap’s default renders.
  • Muki Haklay’s talk on measuring data quality and completeness – turning the “unknown unknowns” into “known unknowns” is something that is becoming increasingly important as the community starts to “market” its data to a wider audience.
  • Mike Miguski’s Walking Papers was very well received and is a brilliant way to make mapping POIs and simple areas easier, without using a GPS. He also showed off some of the lovely looking Stamen map designs.
  • Richard Fairhurst’s lightning talk on Potlatch. Some people might have tried Potlatch a year back, thought “urgh” and gone back to JOSM, but the editor has come a long way recently. Version 1.1, released last week, allows drag-and-drop placement of POIs. Version 2.0 is also on the roadmap and promises a closer look to the Mapnik “default render”.
  • The “State of Japan” talk, while not revealing anything particularly innovative, was very funny and well presented – a simple “nice picture, map before, map after” sequence of slides for each of several shrines and castles in the country. The mapping is very high quality too and shows that OpenStreetMap is more about streets. As an aside, there seems to be a bit of an international “contest” to get the most detailed zoo mapped on OSM at the moment. Amsterdam’s zoo has the individual cages on it, as do several others. London’s is way behind, don’t even have the perimeter on yet.
  • Some of the international lightning talks, from people who had won scholarships from far-off places to come to the conference, were great. I particularly liked Abdel Hassan’s talk about OpenStreetMap in Cairo. GPS receivers have only been legal in Egypt since March!
  • Jorgen Topf’s primer on “proper” GIS and using OpenStreetMap data with it. A topic which the OSM community needs to know more about! It was only the tip of the iceberg, although there’s only so much you can say in 15 minutes.
  • Martin Lucas-Smith’s CycleStreets – attractive looking solution and with a good routing engine that will only get better as the data gets more complete.
  • There was a talk on browser-based rendering of OSM data, which looked pretty exciting.

It was also interesting, for me, to be able to compare with the OSGIS UK conference I also went to, last month.

What I liked more about StateOfTheMap was:

  • This was far and away the most social conference I’ve ever been to. Admittedly already knowing quite a few of the delegates, thanks to UK mapping parties and the London mapping marathon pub trips, helped break the ice, as did being in a city like Amsterdam which naturally lends itself to post-conference relaxing at a canal-side venue. Being stuck in a Travelodge on the edge of a town in the Midlands, or in a modern university campus when the students aren’t around, is never going to have the same opportunities.
  • The full-scale use of technology – not really surprising for a conference by a technology community of course, but it was good to see it being used well, e.g. the Twitter Wall on one of the big TV screens.
  • The conference venue was really nice! New, bright, colourful, with a view of the city. Very Web 2.0. The food and drinks were also excellent. The catering staff even got invited onto the stage at the closing session to be thanked for their good work.

What I liked about OSGIS UK more was:

  • The talks were more consistently high quality. SoTM’s talks were very variable in quality, some of them needed hooking off the stage with a walking stick!
  • All the speakers turned up to speak. Sounds obvious really, but at least two of the SoTM talks were skipped due to speakers not being present. Particularly disappointing was that one of them was the talk I was most looking forward to (about Processing.)

Noticeable about both conferences was:

  • More people than I expected from the big commercial players in the field, despite them in some ways being “rivals” to the concept of open source and OpenStreetMap.
  • Presentations were always short – never longer than 30 minutes and frequently never longer than 15 minutes (or 10 minutes in the case of the “State of Country X” talks, or even 5 minutes for the lightning talks). Even the keynotes were short. This is, by the way, a Good Thing.


Conferences OpenStreetMap

OSM Data & Choropleth Maps

Here is the presentation I was planning to give as a “lightning talk” at the StateOfTheMap conference this weekend. However, there were more speakers than places for these sessions – and quite a few of the speakers failed to appreciate that, by running over the five-minute limit, they would be denying other people the chance of speaking! So I didn’t get to present it. However, you should be able to get the gist of what I was going to say through the contents of the slides.

Conferences OpenStreetMap

State of the Map

I’m off to the State of the Map conference in Amsterdam on Friday. It will be interesting to compare with the OSGIS UK conference a couple of weeks ago.

I almost certainly won’t be live-blogging the event, thanks to data-roaming charges, but if I get around to setting it up, there might be a few text-message-powered short entries.

The schedule is full to bursting, with two parallel streams of talks and a workshop stream. I should, if all goes to plan, be giving a “lightning talk” on how we are using OpenStreetMap data here at UCL, in particular as a “context layer” for laying on choropleth maps. However, there are a lot of lightning talks and only a limited time in the schedule for them, so we shall see. Certainly looking forward to hearing about Steve8’s crowd-funded mapping expedition to Antigua last month! In the “main talks”:

  • Muki Haklay’s talk about quality should be interesting. OSM certainly has “quantity” now, with the ever-increasing numbers of crowd-mappers, thinking about how we measure and display the accuracy and completeness of data is something that is going to become more and more important.
  • Being a closet cartography enthusiast myself, Matt Millar’s stylesheet talk, and Andy Allan’s advanced cartography talk, will be of particular interest.
  • Sunday’s “secret geo-celebrity” keynote soudns intriguing.
  • Peter Miller’s talk “The Good, the Bad and the Ugly”. Hmm!
  • Laura Slivinski’s TerpNav (OSM for pedestrianised areas.)
  • Vladimir Agafonkin’s Online map visualisations made easy – viz is always a crowd-pleaser and the IT-orientated community behind OSM is capable of some great off-the-wall viz thinking thanks to coming from a “different” background than the traditional geographers.
Mashups OpenStreetMap

Map of UK Scenicness… and Pubs


Here’s a little something I knocked up, based on the MySociety scenic score data release last week, as well as OpenStreetMap’s data for the UK – including particularly its pubs.

Basically, the vote point data was converted to a surface, using an IDW (Inverse-Distance Weighted) function. The cell size was pretty small (1km), so there isn’t much smoothing across many vote locations going on – a single vote may cause quite a steep gradient. Instead, the surface effectively extrapolates the values into all areas. Some jiggery-pokery was required to first project the votes onto the British National Grid (so that x/y distances become equivalent) and then the resulting surface was fully rasterised and reprojected to Spherical Mercator so that it could be tiled under the existing OpenStreetMap network overlay. This was surprisingly painful to do.

Note that the photographs that were voted on generally weren’t of the pubs shown on the map, so the pub might well be extremely photogenic – but in an area where the nearest Geograph photos used in the dataset for the voting were not rated highly.

It’s good to see that the Scottish Highlands come out so green (i.e. scenic.) Urban areas generally don’t do too well, although the voting was generally quite critical, so a yellowish hue is still a sign of a very scenic part of a city.

Data came from MySociety (using photographs from Geograph) and OpenStreetMap. The pub icon came from Wikimedia. The map tiles were produced using Mapnik for the OSM network overlay and MapTiler for the scenic map. The increasingly excellent OpenLayers is used to display the tiles, and a point vector layer showing the pubs.

There’s many areas with apparently no pubs at all. This is simply because the data wasn’t in OpenStreetMap when I pulled it in on Friday. However OpenStreetMap’s data is rapidly becoming more complete throughout the UK at the moment, so a future pull of the data should reveal many more pubs.

Some very remote areas don’t have any vote data either, but the production of the surface uses and extrapolates the values from nearby votes instead.



Spherical Mercator Maps in OpenLayers 2.8

Following on from my previous post, it is indeed much easier to put Spherical Mercator “Google-style” maps into OpenLayers, following the 2.8 release this week.

Spherical Mercator is a pseudo-spatial reference system (SRS) that takes some liberties with strict geographic accuracy, to provide a projection that requires the minimum of maths to compute – as this is done on the fly in the user’s browser for OpenLayers-based maps, this is important. (More details.) Maps using Spherical Mercator often use a very hierarchical tile structure – tiles being the generally 256×256 pixel square GIF or PNG images that form the basis of many of the mainstream online “slippy” maps.

Google Maps, OpenStreetMap and NPE-OSM are three sources of tiles using the Spherical Mercator SRS – which the geographers here at UCL have taken to calling WebMercator, and is also known as EPSG:900913 (the numbers representing Google in l33t-speak…) – it has now also been assigned an official EPSG number of 4375 3857. Yahoo and Microsoft Virtual Earth also use Spherical Mercator but a different naming structure for their tiles. The common CRS for all these raster images allows them to be swapped out easily on web maps, which the Mapstraction project aims to achieve.

OpenLayers has an excellent page about Spherical Mercator and has some simple examples to get such a map up and running.

Anyway, I have a large number of sets of tiles in Spherical Mercator, for a project to be launched in the (hopefully near) future. It is now this easy to set them up as layers in OpenLayers.

The map itself still needs to be set up with care:

var bounds = new OpenLayers.Bounds(-30, 40, 15, 70); 
//Fits comfortably around the UK.

map = new OpenLayers.Map ("map", 
    controls: [
        new OpenLayers.Control.Navigation(),
        new OpenLayers.Control.PanZoomBar(),
	new OpenLayers.Control.Attribution(),
	new OpenLayers.Control.MouseDefaults()
    maxExtent: bounds.clone().transform(
        new OpenLayers.Projection("EPSG:4326"), 
        new OpenLayers.Projection("EPSG:900913")), 
    numZoomLevels: 18,
    maxResolution: "auto",
    units: "m",
    projection: new OpenLayers.Projection("EPSG:900913"),
    displayProjection: new OpenLayers.Projection("EPSG:4326")

I’ve created a function to create each layer:

function getChoroplethLayer(name, attrib)
    return new OpenLayers.Layer.OSM("", 
        "/tiles/" + name + "/${z}/${x}/${y}.png", 
        {numZoomLevels: 14, transitionEffect: "resize", 
          attribution: attrib});

Then it’s just a case of running through the layers:

layer_choropleth_1 = getChoroplethLayer("choropleth_1", "X");
layer_choropleth_2 = getChoroplethLayer("choropleth_2", "X");

…and adding them to the map:

map.addLayers([layer_choropleth_1, layer_choropleth_2]);


If you want OpenStreetMap’s default Mapnik map tiles themselves, then it’s even easier:

    new OpenLayers.Layer.OSM(null, null, 
        {transitionEffect: "resize"}));

OpenLayers New Release

OpenLayers, the open source Javascript framework for delivering powerful “slippy” maps via your web browser, has just had a new version released – 2.8. It’s the first release since September last year and is brimming with new features and bug fixes.

If the number of presentations mentioning OpenLayers at Monday’s OS GIS conference is anything to go by, there’s a lot of OpenLayers-powered sites out there now, many of which will benefit from the upgrade. Not least, getting OpenStreetMap base-mapping onto your OpenLayers website just got a whole lot easier. (And will get easier still once the documentation is written!)


OSGIS UK Conference

I was on a very early train on Monday morning, to attend the First OSGIS UK Conference at Nottingham University, hosted by the Centre for Geospatial Science there.

Thanks to the the very tight schedule (speakers generally only had 15 minutes) I was able to see 23 presentations during the day. Most were good, and some were great – it was inspiring to see (a) what people were doing with open source GIS software and (b) how seriously everyone was using the tools – not just as an aside to their regular work but to create real, industrial strength applications for delivery to government bodies and industries.

Some themes came out very strongly – OpenLayers and the GDAL tools were, it seemed, mentioned by nearly every speaker. Certainly, the web browser is the point of delivery for many of the OS GIS projects happening now. Somewhat surprisingly, the map cartography engine Mapnik wasn’t mentioned at all. Less of a surprise, perhaps, was that OpenStreetMap was mentioned in just one talk. Indeed, there was little discussion of open data itself in general – the focus was much on utilising the open source applications and data formats, particularly those under the OSGeo umbrella. There was also no discussion on developing new revenue models from developing open source solutions. Maybe everyone has figured that one out already?

The audience, of around 150 people, was mainly commercial – ESRI and CadCorp (on the app side) and Ordnance Survey and EDINA (on the data side) were all in attendance. Only ~10% were in academia, although around half the talks were given by academics.

It might be the OSGIS UK conference, but there was an excellent representation from around Europe. One of the final sessions was by the European Commission, and many of the individual presentations were from universities around the continent. This reflects that much of the core OS GIS development itself has been driven by academia, such as GRASS in the US and gvSIG in Spain.

Though one of the keynotes was given by the head of the ICA (International Cartographic Association), there were hardly any cartographic presentations, and not really any on geovisualisation either. Perhaps I’m just now starting to appreciate that the “geo” world is actually split into at least four distinct fields – cartography, geovisualisation, GIS analysis and neogeo hacking, with less overlap than I might have thought. The State of the Map conference next month should provide me with my neogeo fix.

Anyway, the talk that won the best presentation award was the one I also liked best – it was well delivered and described a system that was designed for resilience and scalability – something that the best commercial systems can fail to achieve on launch day. It was Mapping Future Climate by Philip James et al at Newcastle University – the system was launched by the government last week and delivers complex models to any one that wants to see them, presented in an attractive way using Open Source tools. The talk also discussed the unusual projection system being used by the Met Office – yet another custom one, to join the thousands of EPSG-designated ones already out there! I also emphasised strongly, as did many in the audience, with the pains of adapting the site for use with IE6 – I’ve spent a couple of days recently pulling my hair out about this particular point. You can see the system here.

I also particuarly liked:

  • Map Warper by Tim Waters, which is essentially an attractive web-based GUI sitting on top of GDAL tools for georeferencing (or “orthorectifying”) rasters. It works well with scans of paper-based maps and aerial photos. I’ve used the Microsoft MapCruncher and the QGIS Georeferencer myself but this looks like a really nice way to do it. Mike also touched on the idea of getting an Open Historical Map project. This is something that the simple Marr Map Mashup in OpenLayers that Alex (my boss) and I did a couple of months back, could contribute to. Tim is also looking at orthorectifying the 10,000 scanned maps in the New York Public Library collection. I was particularly interested in his comments that the underlying GDAL tools are extremely fast, even for large and complex rasters. Not what I’ve found when using them myself, although I may be approaching them in a different way.
  • Sextante by Victor Olaya et al at the University of Extramadura (Spain), a very comprehensive set of over 230 geoprocessing tools, designed to integrate with the various Java-based OS GISes. Similar I think to the Arc Geotoolbox, it has a very similar GUI for building up chains and sequences of operations. In Quantum GIS (my GIS of choice at the moment) there is a similar plugin called fTools, and GRASS has all the operations you could ever need. But Sextante looks very feature rich and the web version uses the Ext-JS framework (as do a number of applications presented) which makes it look very polished indeed.
  • OS GIS for Teaching by Rita Engermaier at the University of Potsdam (Germany). An interesting outline of how students responded to being taught OS GIS applications compared with Arc. A pertinent question was asked at the end though – GIS-based employers will still be looking for specific Arc skills for some time to come. Another similar talk, on OS GISes being used in universities in general, raised the important challenges that (a) staff already know and have the proprietary GISes so why change, and that (b) it’s straightforward to justify purchasing them with departmental budgets, so there’s no perceived benefit of saving the money.
  • SPIRE and Open Source by Rob Booth (IBM) – looking at how open source tools were helping Defra manage and display some of its huge sets of diverse geographic data.
  • Aerial Photo Processing in GRASS by John Stevenson et al at the University of Manchester. This was excellent and a very close contender for my favourite paper – it showed off the power of using GRASS – on the command line no less! – to process remotely sensed data. I wonder if my void filling and hill-shading, that I’ve tried to do with the GDAL tools with only partial success, would be better done in GRASS. Its learning curve was acknowledged but it might be time for me to get stuck into it. I was also very interested to hear about GMT – a toolset which includes the capability to create attractive contours. My own contours, derived using GDAL tools from the SRTM DEM, are not very pretty, so I’ll have a look at it.

Everyone got a 2GB USB key with the conference papers pre-loaded on it which was a nice touch.

A few more notes on some of the other talks:

  • The Ordnance Survey have moved to the more up-to-date OpenLayers 2.7 for their OpenSpace fork. They are also overhauling their lower level OSGB Web Tools package to be a bit more user-friendly, and are planning several releases in the next few months.
  • PostGIS has applied to be part of the OSGeo family. Makes a lot of sense, it’s great to have an organisation packaging and marketing an excellent suite of production-ready OS tools, and with PostGIS, the full stack is there. Now let’s have Mapnik there too!
  • The European Commission have their own licence – the EUPL – for publically-funded work designed for use by public authorities. It’s “yet another” OS licence but is compatible with the various main OS licences (GPL, Apache) but designed to be enforceable across all the member states’ jurisdictions. It’s more of a “marketing” thing, apparently, to help encourage OS software use by administrations across the continent. They also have “yet another” code sharing platform,, where code can be hosted, if it’s publicly financed and open source. Sextante and gvSIG are two projects using the “GIS/SDI” area on OSOR – it can also act as the underlying repository while the project’s own development portal keeps its branding. The pan-European nature could potentially be very powerful for raising awareness of OS projects in the public sector.
  • There were some lower-level talks, on data and semantics – areas that might not be so glamorous, but are still interesting. These included an outline of the GeoSciML schema for describing geological data, and defining a rules-based language for geospatial constructs, such as how a feature can be identified as being a roundabout, for possible use in the pan-European INSPIRE initiative.
  • The OSGeo UK group is new and is perhaps still deciding what its true role is – whether it should be lobbying the government for even greater use of OS GIS tools, having a marketing role to organisations, or providing a forum for UK-specific discussion of OS GIS usage.
  • A common theme of the higher-level, application based talks was that the project designers were very impressed with the support they had received from the developers of the underlying tools – with patches often being delivered overnight. This is very encouraging and shows the healthy and active nature of the field.

Overall, I was most impressed with what I saw. There was a great buzz in the room – a diverse range of backgrounds, but everyone enjoying seeing what could be done with Open Source tools. There was perhaps a feeling that we might not be having to use Arc any more in the near future, perhaps?

Nottingham already have next year’s conference date set. Maybe I should do a talk on Mapnik’s capabilities at the next one…