GeoCommons GeoJSON in OpenLayers

So, with GeoCommons you can export all the features from a dataset in GeoJSON format. This is very useful. Then can it be displayed in Openlayers? Why yes it can!

I use the following strategy, wrapping the response with a little bit extra so that the GeoJSON format can read it properly.

var url = "";

var p = new OpenLayers.Format.GeoJSON();

OpenLayers.loadURL(url, {}, null, function (response) {
 var gformat = new OpenLayers.Format.GeoJSON();
 gg = '{"type":"FeatureCollection", "features":' +
      response.responseText + '}';
 var feats =;


Have a look a the live demo of this example of loading points from a Geocommons dataset straight into an OpenLayers map
(Note that I am using an OpenLayers.ProxyHost proxy to make it work in FF)

It is of course very basic in terms of styling, but it’s a start!

Incidentally the points are from “CARMA, India Power Plant Emissions, India, 2000/ 2007/Future” (carbon monitoring)


openspace: licences, limits and first steps (plus demo!)

Was fortunate to be at the launch of Ordnance Survey’s OpenSpace – their slippy mapping API, last Friday. Here are some impressions, and an example for you to play with! My OpenSpace demo allows you to zoom in, out, etc and draw around the generalised buildings and then save the polygon as a GML file. It uses FeatureServer and the built-in vector drawing tools of the OpenLayers/OpenSpace API. Nick from Free-map has a example that loads in GeoRSS feeds.

openspace example and vector editing

Yep, currently it is closed alpha, but those who attended didn’t have to sign any NDAs, indeed, the OS took the open and honest approach and even admitted that they were not “going to pretend to now be one of the good guys” as Peter ter Haar, Director of Products said. Peter, I think, before joining the OS, was instrumental in getting Mapguide open sourced with Autodesk and OSGEO, although, this wasn’t mentioned during the day, or on any press releases about OpenSpace. Overall it is reflected of the tone of the day, that there are people doing good stuff, but that the organization has issues, but that these could be changed.

So, it’s taken two years, and a Cabinet report (Power of Information Review) for the Ordnance Survey to release this – but it’s not without it’s limitations. OpenSpace does in their eyes address the OS mandate to maximizing use of geographic information, allowing non-commercial use whilst also providing a way for them to generate some revenue for the future.

Most of the discussion was about the licence and limits. It’s free for “non commerical experimentation” and non-commercial is quite a strict term – no little ad’s, no paypal donate link, nothing. The basis of this is that they don’t want to annoy their partners, and that they want to have an “upgrade path”.

The API is OpenLayers based, with additional goodies such as gazetteer search and a “momentum” drag-and-let-go effect on the map. However, the gazetteer doesn’t do postcodes! Also, it is in OSGB coordinates, so there is also some helper functions for translating to and from lat lon. However, this basic client side conversion can lead to errors, apparently, and in some places they can be out by tens of metres. The OS developers said that if users think that a server side conversion is better, then that could be accommodated.

The coverage is just England, Wales and Scotland (not NI). I asked if the coverage was going to increase, or if other National Mapping Agencies were interested in adding to it, and possibly in the next couple of months, something will be announced. Oh, and no Isle of Man (just like Google, but unlike Openstreetmap), or the Scilly isles.

There was a big discussion of commercial and non commercial use. They said that most NGO’s, charities and small groups would, in the majority of cases be able to use OS maps, because they would be working as agents of other partners that have OS agreements, i.e. local governments. So, in a sense, the types of websites I can see ideally suited for use of OpenSpace, already have access to OS maps.

As you can see from my demo, there are no 1:25,000 maps – (1:25,000 are the same as the paper Explorer maps). The reason why there is none, is that they currently do not offer these to their partners anyhow for use in other mapping systems. Fair enough, but the 1:25,000 would be great to have. The StreetView layer seemed to have been edited for colour. Footpaths are not present, however the generalised buildings are unique.

Licence: Here, they’ve gone out of their way to clarify the position derived data, something that Google and the other web mapping providers haven’t. Basically Google could say “you know all those pins you’ve been putting on our maps? Well, they are ours, and always have been!”. The OS are basically saying, if it’s derived, then it’s ours but we give an permanent licence for you to use it, and also a licence for us, the OS to use it too. If it’s your own data, then it’s not derived, and it’s fully your data. If it’s derived, but is a “severable improvement”, i.e. if it can stand alone from the map, then it’s yours but you grant the OS the licence for them to use it. There was a long (lunch-turning-cold) discussion about derived data, copied data, substitutability, etc… Thus in my example, it’s a non commercial application, it’s most probably derived data, so it belongs to the OS, but you can use it, for non-commerical purposes only.

Limits, currently 30,000 tile hits per 24 hrs, and 1,000 gazetteer hits. It seems very low, and is. It’s for “experimentation” with a “growth path” in mind. I.e. if you want more, or want to make some money, then you gotta pay for it.

Summary: The maps, as we know, are lovely, the interface works well, the licence on derived data is at least clearly defined, but the limits and non commerical-ness will put off small websites. It’s limited to the UK only (in coverage) so no global / European use (yet?), NGO’s and Charities already can get OS data without going down a “growth path”. I find it hard to think who could be using this, but think it’s a good start – they make no bones about being the Bad Guys, but at least the bad guys want to bring something to the party.

BarCamp Leeds Map

Here’s a map of the registrants for BarCamp Leeds 2007, from the registration data given to me by Imran. Nice to see a wide spread of people from around the place, and, as you can see, they are mostly up North! It usesĀ  the very good Openlayers JavaScript mapping api, and the default underlying mapping is of OpenStreetMapĀ  but also Yahoo, and Google Hybrid map can be seen (thanks Chris for the OSM tiles!).

Looking forward to barcamping, going to do something geo, whether opensource geostack, openstreetmap, or desktop GIS stuff, who knows! Any suggestions?

(Got this up on on the day I’ve registered it)