Back in July I gave a talk at Oxford Geek Nights about the Digital Britain report entitled “#DigitalBritain fail” in which I discussed the Digital Britain report and some of it’s many shortcomings.

One of the potential courses of action I suggested that people could take was to essentially smile,  say “that’s nice dear” and continue innovating. To take the typically open source approach adopted by the guys at Open Streetmap (among others) and recreate proprietary datasets in the public domain.

I was therefore delighted when I came across the guys at Ernest Marples, who were attempting to provide a free version of the Postcode to location database.

As a bit of background; in the UK the state (via Royal mail holdings for which the state is the sole shareholder) has a monopoly on all postcode to location lookups. This monopoly is protected by crown copyright and a royal charter, which basically means that even though the dataset was produced using taxpayer’s money it is owned by the crown (in the case of crown copyright), and the charter means that nobody else is permitted to provide the same service.

This means that in order to do anything with postcodes you need to pay a licence fee to the post office, pricing the small players out of the game or limiting them to use a service provider such as Yahoo (which has it’s own terms of usage). A similar situation exists for geolocation in general, but in this instance you have to pay the Ordnance Survey.

This situation is archaic and was a hot topic at Barcamp Transparency. Data which are produced by taxpayer money should be freely available to all, and I had hoped that the dissolution of crown copyright would have been one of the first thing that the Digital Britain report recommended.

Yesterday, Ernest Marples announced in their blog that they were shutting down their service in the face of a legal challenge from Royal Mail, who pretty much accused them of stealing their database. Although the Ernest Marples guys were a little cagey about where they got their data (with hindsight this was probably a mistake) they did explicitly state that it was not using the Royal Mail database in any way.

Under the terms of the charter however, they are simply not permitted to provide this service and compete with Royal mail, and this is the basis of the legal challenge.

I am saddened to see this promising project go, and especially sorry to see that they don’t have the funds to get their day in court. A court case of this nature could provide a useful forum to hold a long overdue debate as to the relevance of the charter and crown copyright in general in the twenty-first century.

Crown copyright is a problem (as well as being morally dubious), and a monopoly is always bad (especially when state enforced). It is sad to see promising UK innovation stifled by entrenched interests, but it seems to be a reoccuring theme in modern Britain. As we have just seen it puts severe limits on just how far a project can go in opening up and recreating data sets, and this worries me.

I wish the project and it’s organisers all the best for the future.

Top image “postbox_20may2009_0830” by Patrick H. Lauke

Geotagging and GeoRSS support has been available in Elgg for a little while now, but like so many cool features of the platform, I haven’t really had the time to draw people’s attention to it.

Although I am drawing your attention to it now, it should be noted that this is still somewhat under development!

Anatomy of a geocoder

To begin geocoding your data you will need a geocoder. This is not something that Elgg comes installed with by default, although here’s one I coded earlier.

This geocoder users the Google maps API to do the actual encoding, and provides two primary features.

  • It handles the plugin hook “geocode”,”location”
  • It listens to all create events and attempts to tag it with the latitude and longitude – either from a ->location metadata on the object itself, or from the user’s current ->location – you could get more creative, this is a simple example.

When you attempt to geocode a location you call the function elgg_geocode_location(). This in turn triggers the above plugin hook and attempts to encode the data.

For efficiency once a location has been geocoded the result is cached. Future attempts to code the same location will return the result from the cache.

Once installed and configured, new content (wire posts etc) will be tagged with a latitude and longitude. Fill in your profile location field and try it out for yourself!

Location based searches

Once things are tagged with a location, you can start to use location as a starting point for searching by using some of the location aware search functions in location.php.

This hasn’t currently been hooked up to the Elgg interface in any way, but that doesn’t stop you making use of it in your plugins.


This is something you’ll be pleased to know that you get for free!

As you list your entities using the Elgg listing tools using the RSS view, if an entity has a position defined it will be included using standard geoRSS simple notation, i.e:

<georss:point> 45.256 -71.92 </georss:point>

Happy coding!