Categories
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.
Categories
Mashups OpenStreetMap

Map of UK Scenicness… and Pubs

picture-5

Here’s a little something [no longer online] 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.

scotland
Categories
OpenLayers

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]);

Easy!

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

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

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!)

Categories
Conferences

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, OSOR.eu, 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…

Categories
Conferences OpenStreetMap

Open Source GIS is from Mars, OpenStreetMap is from Venus?

I’m going to a couple of conferences in the next few weeks – the 1st Open Source GIS UK (OSGIS UK) conference at Nottingham University, and State of the Map 2009, the 3rd OpenStreetMap conference in Amsterdam.

On the face of it, one might expect an overlap between the two conferences. In both cases, it is about a community geared towards developing and using open source (“free”) geo-applications to further understanding of spatial issues or “do cool things”.

But OpenStreetMap (OSM) is not in the title of any of the talks on the OSGIS agenda.”GIS” appears just once in the SOTM agenda titles – “Bridging the GAp: Using OSM Data with GIS Tools” by Jochen Topf should be an interesting talk.

I suppose the two communities are really separate, coming from two different sources, operating on two levels and with two aims.

  • The open source GIS community comes from academia, particularly Geography, and is interested in having the power to develop applications to advance research, without facing the user interface and functionality challenges of the big proprietary GISes, not to mention the expensive licensing costs. They already have the data – they’ve collected it, or negotiated academic rates for access to the national mapping agencies.
  • The OSM community comes from IT and just wants to do cool things with the data – but doesn’t have the willingness to pay commercial rates for the data – so they are more focused with getting the data in the first place. Once they have it, they are not willing to learn (or aware of ) GISes, which are complicated bits of software, at best, instead generally scripts for specific bits of functionality.

Two worlds, it seems, with “open” goals but seemingly little overlap.

Categories
Mashups

ScenicOrNot

Those clever and inventive people at MySociety have created another slick website – now you can rate each square kilometre of the UK to help build up a map of the country’s prettiness.

See here to start voting! You’ll see a near-randomly selected photograph of a place in the UK – click 1-10 above the photo and you are on to the next one.

I hope that the Scottish Highlands come out very well – they certainly should do, many parts are very pretty when it’s not raining there…

I must declare a personal interest, as some of the photographs out there are mine. The scores for mine are pretty middle-of-the-road, as when I joined the Geograph project (which is where the photos are coming from) all the scenic areas near me had already had been well photographed.

Categories
OpenStreetMap

Testing the OpenStreetMap WordPress Plugin

[osm_map lat=”51.525″ long=”-0.134″ zoom=”17″ type=”Mapnik” width=”500″ height=”300″ marker=”51.525,-0.134″]The Pearson Building, UCL Geography.

Very nice. Hopefully there will soon be an easy way to put a pin on the map using this plugin. [Update: It’s been added – thanks!]

Categories
Data Graphics

A Collection of Poor Data Graphics

This BBC article on the budget contains no less than six data graphics – and there’s something wrong with every single one.

By “something wrong”, I mean either:

  • I have to concentrate on the graphic, rather than just glance at it, to understand what it is trying to show, or
  • The numbers are distorted by the graphic – the worse kind of “wrong” as a glance at it could mislead.

The issues are:

  1. UK Budget Deficits: Apart from the unwieldy x-axis labels, showing every second fiscal year, my main gripe is the projected section of this stacked bar chart. It only works because the three projections don’t “swap over” their values at any point. But I still had to look at it for longer than necessary, to realise that the “upper value” stacked bars run “behind” the lower ones.
  2. Long-Term UK Government Debt: The use of a line chart, with smoothly flowing lines, rather than bars suggests that there are values available on a more frequent basis than every year – or that the joins between each yearly point are just artistic and so misleading. If the former, then having the unwieldy “fiscal year” x-axis, with ticks every five years, is unnecessary – why not just shift the tick marks back by 4 months and have normal years? This would be considerably easier to read. If the latter, then that’s just plain misleading!
  3. Treasury Growth Forecasts: The worst one of all. The addition of direction arrows above the positive bars (or below the negative bars) – with the value between them and the bar, and the arrows coloured the same, made me assume the bar ran up to the top of the arrow – massively increasing the value of the 2010 independent forecast, for instance. Not sure why the colours needed to change from the first chart, either, seeing as at least two of the categories have the same source in both charts.
  4. UK Claimant Count: This is a simple sequence of choropleths and as such really shouldn’t be a Flash-based chart – this is trivial to do in HTML/CSS alone, never mind Javascript. The colour sequence is odd too – a series of blues suggesting a value-based ordering, which then arbitrarily switches to purple for the final one/two bins. (The legend changing slightly for the last two!) The choropleth is also too small, so show the needed detail.
  5. Government Spending/Taxes: 3D pie-charts, tut tut! The tilt exaggerates the values at the front, making them seem bigger than they are.
  6. UK Rescue Plans: The circles are correctly scaled in 2D rather than 1D – a common mistake averted. However, they unnecessarily overlap with each other, so partly obscuring the genuine ratios

The Beeb designers need to take a read of Tufte and not go down the Microsoft Excel route!

Categories
Conferences

MSc Dissertation

Last year (2007-8) I studied for an MSc in Geographic Information Systems, at City University London. The course was taught by an excellent team of academics and I can thoroughly recommend it as a good, technology-focused introduction to GIS. The highlight was the field-trip, a week away in the Lake District, carrying out three two-day projects, each involving planning, data gathering, preparing and presenting the findings.

The summer last year was spent researching and writing the dissertation. It is entitled “Use of a GIS for Production and Maintenance of Street Orienteering Maps: Can a GIS and Spatially Aware Data add Value to Orienteering?” and can be downloaded from here (24MB, 102 pages).

You almost certainly don’t want to read 102 pages, so there is an extended abstract here (1MB, 5 pages), entitled “Creating and Maintaining Street Orienteering Maps using OpenStreetMap”, which appears in the “Proceedings of the GIS Research UK 17th Annual Conference”, aka GISRUK 2009. I presented a poster summarising the work at the conference, which is reproduced below – linked to a larger version.

Poster for GISRUK 2009