Wednesday, 8 December 2010

Tracing a road around the world

I've always loved maps. There's a 'joke' about a certain kind of kid swallowing the dictionary. I wasn't ever that kid. Nope, I was the kid who read the atlas instead. We actually had one, which attentive readers will perhaps understand was something of a win.

Atlases, and a love of maps, all kinds of maps, playing with maps, drawing maps, interacting with maps is something that I used to be a little bit shy about admitting. No more. The world has changed, or perhaps rather the circles I move within have changed, I'm not sure. But regardless, the simple pleasure of getting a system to place a marker in the right place, then colour it depending on pre-determined requirements still fills me with glee. It will always fill me with glee.

So, I guess we start at the beginning again, bearing in mind that the best holiday I ever had was navigating off a Michelin map through the Pyrenees as my partner got arm ache from driving around all the hairpins, that I can comfortably navigate people through the centre of London with the aid of an A-Z, in our house we don't use Tom Tom, we use Lou Lou and that I don't ever have to turn the map the right way round to orientate myself. I'm not boasting here, simply pre-empting the inevitable 'but you're a girl, girls can't read maps/can't navigate/can't read signs/can't read maps without turning them around'. This one can, just so we're clear. I am not alone in this, just so we're clear. They're not pre-requisites to being able to map data onto a map, just so we're clear. But loving maps, so intensely, understanding their power but also their restrictions? That really helps, I think.

There are two kinds of maps in the world. One comes as a photograph, a picture, a jpeg. We call them raster images - they are simply images and nothing more. They cannot be asked questions of, you can't search them, if you zoom into them, the points on the map ( the distance between your house and the local pub, for example) will move, but not in relation to each other to any kind of scale. Flat, 2 dimensional map. They've got their uses, of course they do, they're great as a print out on some water resilient paper to take out on the hill with you. They're great for printing out and taking into London with you on a sight seeing trip.

But. You can't move anything, change anything, search for anything, update anything. It's static. A snapshot in time of the way things were, because the second you printed it, it's out of date. History.

The second type of map, we call vector. What it actually means is, 3 dimensional. Sometimes quite literally with the help of some funky tools and as this lovely map of Hong Kong shows.But more often than not, it's 3 dimensional in an entirely different way in that it's searchable, scaleable and interactive. You can drop pins on it, move around the map and the pin will stay in the right place - over the top of the house you dropped it on.  You can search by street name and you can plot a path on it - well draw one actually, you don't have to plot anything at all.

There are 2 kinds of mapping tool The first kind are the ones like Google, Bing and the previously linked to 3D Hong Kong map. They're useful to a point, but the point quickly becomes limiting. You can search it, and it will take you to the street you were looking for. But it will be a rough approximation of a street. Put the satellite layer over the top and you'll see what I mean - they're ever so slightly out of sync.

Next, try dropping a pin somewhere on a Google map with the zoom level not zoomed all the way in. Now zoom all the way in. Pin isn't quite on the corner of that junction that you dropped it on any more. It's moved. Fine if you trust that people are capable of spotting a bright yellow bin full of grit from 20 feet away. Not good if that pin represents the something you need to be accurate. Next, search for Witton Park on Google maps. Zoom in to the 2nd from last setting. Note that Witton is spelt as Whitton - right next to each other. One of those spellings is right. One is wrong. Do you know who I can report that to? No one.

Finally, embedding Google maps is a complete nightmare. If you have more than 30 things or so to map, then it will trip over to page 2. And then page 3. Which is fine if you're viewing a map in Google and you realise that that's what happening (some people wont and will think, for example, that you've only mapped the grit bins in Darwen and ignored Blackburn completely). When you come to embed the map into a webpage, the fact that there is more than one page of information you've mapped isn't mentioned. In order to get all the points to display in your embedded map, you have to go to Google Maps, hit the RSS button, get the RSS url of your points and chuck it back into Google Maps again. Then you are graced with a map which you can embed which will show everyone all your points.

I could go on. I think you get the point. You might ask why on earth anyone ever uses Google Maps. I'll explain that at the bottom but over the next few paragraphs, I suspect it will become clear.

The second kind of map is Ordnance Survey built and oh boy is it accurate. Need to know where a set of steps is or how wide a pavement is? OS mapping can tell you. Until April 1st this year (2010) the maps were acknowledged to be so accurate that people paid a lot of money to access that data. Witton gets spelt the right way. If it weren't I'd know exactly who to speak to to get it corrected. They not only provide line maps, they also provide maps with door numbers on to help you orientate yourself (or check your co-ordinates are correct). There is still a bit of a zoom problem, in that if you draw on the map at a certain zoom level, it will move slightly when you zoom in, say from 5km to 1km. But under 1km where you switch to a more detailed map, it's accurate. Points dropped don't wander off. It's accurate, it's reliable.

More interestingly, it can also be fed into Geographical Information Systems (GIS). GIS is a loose term for the set of tools which allows you to place massive amounts of points onto OS mapping, quickly and reasonably simply. Most people have done a degree in these systems and are can make them dance. I've taught myself almost entirely and so am a little behind. To add insult to injury, GIS systems are enormously expensive and so I don't have access to one any more because it's not part of my job. Which is where Open Space comes in. Open Space allows you to do similar things to what you historically could only do with an expensive GIS tool.

So, why, I hear you ask, have I mapped our grit bins and gritting routes using Google?

Ordnance Survey have made a big big deal of their Open Space tools. This 'path' map is an amazing example of what can be done - entirely for free. Except. There's always an except, isn't there. In the bottom left hand corner, you will note a little column which depending on the time of day you view it, will either be green or red. Hover over it with your mouse and you will see "XX% of daily map tile limit used". Open Space, when publicising their wonderful new tools, seem to forget to mention this. You get 150 'views' a day unless you pay for more. We'd go over that in about 3-4 hours, I'd guess. What happens after you exceed that 150 views? Well, we don't know but we're assuming that no information is served at all. Which isn't going to look very good now, is it?

And we're skint. Utterly and completely broke, as a Council, with £48 million of savings to make before 31st March 2011. So I didn't map the routes/bins in anything but Google, because Google was free. Which is why they can afford to ignore complaints of spelling. Why inaccuracies can be forgiven. Why display errors meaning suddenly my screen shows 10 markers all on top of each other practically, for no reason whatsoever, must be simply ignored.

It's free.

So, in true Brit style, we make do and mend. In the meantime, I've bought myself a book and will hopefully be teaching myself how to code so I can make Google behave a little better, so I can code around some of the things which are causing a problem. But (I may be wrong here, but I don't think I am) even then, once you start to code and hack about with Google in anything more complicated than what we've done already, Google control access to their maps with something called an API key. And once again, imposes limits for page views.

So what's the answer?

I don't know. This is where I hope someone else picks it up and passes it on - back to me. Can anyone help? Is there an open source way of displaying a map, inside a box, with a zoom in and out tool, a search tool and is accurate, which I can embed in our web pages and will cost me nothing, be entirely reliable and not melt my brain in the process of trying to work it out?

So. To summarise. There might only be 2 different kinds of map. And only 2 different ways of seeing those maps and interacting with 1 kind of those 2 different kinds of map. But when you start to delve a little further, it's really rather more complicated than it might first appear. And free is free for a reason.


  1. another brill post! I wish I liked maps. I will tell you the story of me and the tomtom one day...
    Keep up the good work, if you enjoy what you do then you will do it well. Always seems to happen if you are determined.

  2. Adrian> I rather hoped you might know but didn't want to impose.
    Chris> I don't know anything. Or rather, I don't specialise in anything, perhaps, so I can still remember fiercly how it feels for none of it to make sense and don't want anyone else to feel quite as damn lost as I did. It took me 2 yrs straight to teach myself GIS. Awful slow.

  3. Keep sharing the joy, that's all I can say. It took me 5 years to learn photoshop, and if I live to be 100 I will never be an expert in it. I do find that I don't bother teaching photoshop to the community any more, thanks to picasa they can do most stuff they want to do in that. I worry about google ruling the world, but hey, like you say, its free, it does the job so what the hell.

  4. Louise, there is no limit on the number of page views in the Google Maps API.

    If you want a more open source mapping service try

  5. Hi Louise,

    On Google Maps errors - there is a link at the bottom of Google Maps to 'report a problem'.

    You might have to zoom some way out on the map to see the link. Correction of any reported error can however take some time.

  6. Hi Louise, have you had a look at Stuarts grit bin project over at Lichfield?

    It's a great approach to mapping bins with Google. If you need any help with the coding let me know and I'll see if I can help.