Saturday 9 August 2014

Web Mercator and Comparisons

Getting the curved surface of the earth onto a flat map (paper or screen) requires a map projection. The reason so many projections exist is because there is no perfect projection and they all contain distortions which affect area, distance, shape or size...and distortions vary to different extents across the map.

While for most people, the often complex mathematics of transforming locations to the map is beyond their expertise it's important to pay some attention to the choice of projection. Choosing an appropriate projection is vital to ensure that the inherent distortions don't wreck the very purpose of your map.

Let's look at one example...say, for instance, you were wanting to create a map which allowed you to compare the areal extents of different cities across the world. You might want to see how one city compares to another in terms of the amount of green space, or the population density in urban areas. The one thing, the only thing, you need to get right is the choice of a projection that supports visual comparison. You need a projection that does not distort area...because area is the one property of the map that supports the cognitive process of visual comparison. Let's see this in action...

We can see what happens to distortions when we overlay Tissot's Indicatrix on the curved surface of the earth. The Indicatrix is simply a grid of equally sized circles (on the globe) which are a very familiar shape which makes it easy for us to see what happens when it gets distorted through projection. When projected, the grid of circles of equal size, shape and area are distorted which gives us a clear indication of what happens to the real geography that gets projected at the same time.

Tissot's Indicatrix on a globe:

Here's what happens when we project to Web Mercator, the default for web maps:

Web Mercator preserves angles (which is why the circles retain their shape) but distorts size, and, fundamentally, area. It's great for navigation (its intended purpose) but dreadful for most other purposes.

Now let's compare the two cities marked on the map...Oslo and Singapore.

Oslo is at 60 degrees North. Singapore is pretty much on the Equator at 1 degree North. There's virtually 60 degrees of latitude between them and looking at the two Tissot Indicatrix circles they fall in you can see the distortions that Web Mercator creates in the size of area between the two places. If you examine the size of the two circles you find that the Indicatrix around Oslo is approximately 75% larger than the one around Singapore.

Let's have a look at the impact on a real map. The following maps are on Web Mercator and both at a scale of 1:250,000. Oslo on the left, Singapore on the right.

Now let's look at exactly the same map but projected using a Cylindrical Equal Area projection. I've switched the standard parallel to 60 degrees North for the Oslo map just to ensure the shape isn't distorted compared to Singapore but areas are consistent between the two maps. Now compare Oslo with Singapore.

Oslo is now shown at the correct areal extent and size compared to Singapore. The distortions you see in the size of text etc is simply because the map tiles used to display this were originally in Web the fact they are now reduced in area by about 75% actually results in the map looking like it's shrunk. It has! It also shows how much Web Mercator tiles are distorted in terms of area the further from the equator you go.

The answer...pick the right projection for the right job. You can go beyond Web Mercator on a web map so it's just a case of figuring out how to do it using your technology of choice. If you're going to be comparing areas either for city comparison or for thematics you really do need an equal area projection unless all of your cities sit on the same degree of latitude. If not, you're literally pulling the wool over the eyes of your map readers and they leave with a totally distorted impression of the themes mapped.

Next time you look at a map whose purpose is comparing places just pause to check the projection and then make your own decision whether you can trust what your eyes are telling you.

No comments:

Post a Comment