On-The-Fly Mapping Preview

oom1

A public preview of the on-the-fly mapping that is being used for the CensusGIV project is available at OpenOrienteeringMap (OOM).

The same mechanism that will be used to produce the varied choropleth maps of census data is being used to produce the “Street-O” and “Pseud-O” maps on OOM. The main differences are that the map image files, or tiles, are more aggressively cached – as there’s only two maps rather than millions – and the designs are in an XML file rather than being specified on the URL, as they are much more complex than simple thematic choropleth maps.

oom4

Further details of the construction are in a posting and information page on my personal blog.

Top: “Pseud-O” map of Furzton district in Milton Keynes. Bottom: Edinburgh Old Town “Street-O” map.

CensusGIV Prototype Presentation for CASA

My boss (Dr Pablo Mateos) and I gave this presentation today as part of this term’s CASA Seminar series here at UCL. My bit starts at slide 22 (of 60! – we just about managed it in the hour but only by rushing at the end.)

chorogen
CensusGIV – Geographic Information Visualisation of Census Data

View more documents from oliverobrien.

Note that the censusprofiler site mentioned a couple of times in the presentation only has a (very out of date) blog on it at the moment, and the prototype itself is not yet available for general use – with luck, an alpha version will be available to play with by the end of the year.

Manchester Map

This is the fifth in a series detailing the projects I have worked on at UCL in the last academic year.

manchester

This was born out of Alex acquiring a old (1094) map of Manchester showing the different housing types that existed back then. I put together some image tiles he created of the map, in OpenLayers, and combined it with some existing modern OAC demographic map tiles that I had created for a separate project, and Google mapping and aerial imagery. Vectors are not used on the map, but you can switch between, combine and reorder the raster layers, for quick visual comparison between the maps.

Alex blogs the creation process here, and you can see the map itself here.

HE Profiler

This is the fourth in a series detailing the projects I have worked on at UCL in the last academic year.

The HE Profiler is the last of the three “core” school-profiling map mashups that I have developed over the last year – this has been developed over the last few weeks and indeed was finished only today, my final project of the year.

It is designed to be used by university widening-participation administrators, as a graphical tool to discover and evaluate the schools to target for campaigns to encourage university application. To do this, it makes use of two metrics – the OAC demographics of pupils attending each school, and the POLAR score of their postcode – in simple terms a National Statistics demographic describing the likelihood that people from this postcode go to university.

Again it is powered by OpenLayers, displaying point-based vector information on top of Google Maps image tiles, using NPE data for geocoding postcodes. The most interesting thing about this application is I’ve started to explore the very powerful rule/attribute based symbolisation for points available in OpenLayers. This sort of symbolisation will be, I expect, very useful in my next year’s project. I am very impressed with what can be done – some quite GIS-like properties present in a popular and freely available web application.

heprofiler

The graphic above shows target schools for a central-London university, based on the proportion of POLAR1/2 pupils (least likely to go to universities) compared with the rest. Schools with a majority of pupils in this category are coloured red. The area of each circle represents the number of such pupils present. The poor representation at university of the Thames Gateway region can be clearly seen. As an aside, the OAC demographic, not shown here, does not work well for London due to its size – the OAC is calibrated across the whole UK, and it is likely a more specific demographic analysis for London (e.g. LOAC) for schools there, would be more useful.

The Education Atlas

This is the second in a series detailing the projects I have worked on at UCL in the last academic year.

This is a mashup, powered by OpenLayers, and using network data from OpenStreetMap (OSM) to provide a “contextual window” on top of choropleths (colour-region maps) representing various educational attributes. Both the choropleths and the OSM maps were created using Mapnik. Data from the NPEMap project is used to provide geocoding (locating from postcodes). Schools from the ShowUsABetterWay competition are available as a simple point-based vector layer.

This project has been through various iterations before ending up as a (sort-of) finished product. An earlier version was briefly demoed at the GISRUK 2009 conference in April at Durham. This was an “all-singing, all-dancing” mashup, which wowed the judges at the conference (it was entered in, and won, the Mashup Challenge competition) with its many layers and features, but was probably too complicated for the intended end use.

The functionality has been split into three different mashups – the first, the choropleths, form the Education Atlas. The school catchment contours are in a separate mashup, School Catchments, which I’ll talk about in a future post. The detailed metrics about each individual school are in a third application.

The choropleths mainly relate to academic attainment and geodemographic background (for GCSE pupils) and A-Level subject choice. Some interesting patterns emerge, for example French is particularly popular in Kent (funny that…) and Geography is more popular in the rural north of England than in the cities – as shown below. The demographic maps show a characteristic pattern of city poverty/underachievement compared with rural areas.

eduatlas

The resulting slimmed-down application is available at http://atlas.publicprofiler.org/, however it is only soft-launched, as the data is quite old, and there are some noticeable gaps in coverage, particularly in Manchester and Hampshire, where state school pupils generally don’t have any sixth-form provision in their secondary schools.

Noteable features, apart from the bespoke black-and-white “network” layer, are the keys, which change depending on the choropleth selected.

I presented some screenshots of the mashup, and talked about how it was made, at the RGS conference in Manchester, in August.

A screenshot of the mashup forms the banner of this blog.

Education Profiling with an Open Source Geostack

I was in Manchester yesterday for the first day of the Royal Geographical Society annual conference. I gave a talk at the session called “New Urban Geography: Evolving Area Classification for Socio-Spatial Generalisation” which was convened by my boss Dr Alex Singleton and chaired by Prof Paul Longley, both also of the Department of Geography here at UCL.

My talk discussed a Web 2.0-style mashup of English school attainment and geodemographic data, which has been put together as an online “atlas” using OpenStreetMap data as a contextual layer, Mapnik to produce the graphics and OpenLayers to display them. The atlas is not yet complete, and the data is a little old, so it’s not being widely promoted yet, but if you are really keen on visiting it yourself you can find the URL by looking carefully in the presentation…

It is here.



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"}));

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