Showing posts with label projection. Show all posts
Showing posts with label projection. Show all posts

Tuesday, 4 August 2015

"The Regional World", version 2

I recently came back to CartoDB to do a bit of experimenting for some GIS work I'm doing this autumn, so I decided to revisit a topic I looked at before: sub-national regions of the world. In a previous version I posted via Twitter I took sub-national boundaries of the world and put together an interactive map (in about 15 minutes, so it wasn't very good). I've now produced a better one. It's not perfect but I have managed to add in an equal area projection version and other simple features - such as scale-dependent labelling and line styling.

The Regional World - version 2

According to Wikipedia, the largest sub-national divisions in the world are the Sakha Republic (Yakutiya) in Russia, Western Australia, and Krasnoyarsk Krai, also in Russia. The first two are more than ten times the size of the UK (which is 244,000 sq km) and number three almost is. If you click on the link above to go to the map then you'll see that you can also click on the equal area version. I did this because web maps often default to the Mercator projection, which causes massive distortion towards the poles and leads people into thinking Greenland is bigger than Africa, which of course it isn't.

The Regional World - equal area projection

The equal area projection does of course mean that areas towards the poles are extremely distorted, but that's part of the deal with some map projections. I've taken the administrative boundaries at face value, but of course they may not be 100% accurate, as the authors of the data acknowledge:

"This is the toughest dataset to keep current. Unlike the United States, other countries constantly rearrange their admin-1 units, slicing and combining them on a regular basis."

Read more about the data

You'll notice that I have put links to a small number of countries on the main map. I chose these because I find them interesting, that's all. This was part experiment with CartoDB and a little SQL (projection) and CSS (scale-dependent styling), part GIS project, part teaching material, partly driven by my interest in regions more generally, and part pre-holiday wind-down. In relation to the latter, just for fun, I have hidden two little artefacts in the main map that only appear when you zoom to a certain level at two places on earth. 

Can you find them? 

Answers via Twitter or e-mail...



Thursday, 31 January 2013

Which world map projection is correct?

A recent Google map puzzle got me thinking once again about map projections and the ways in which they can be used for web maps. Google maps uses a variation on the Mercator projection which, as we all know, dates from 1569. Most people who are into maps know that this particular projection makes areas close to the poles look bigger than they actually are. This distortion is an unavoidable problem when trying to project the surface of a big round object like the earth on to a flat surface. So, which world map project is correct? The answer is of course that none are 'correct' or possibly that there can be no 'correct'. Every projection compromises something. To demonstrate this I've mapped the world nine different times in the image below to demonstrate the impact of using different projections.


I've pasted the individual images below and you should be able to flick through them for comparison by clicking on one and then clicking to see each successive image. Two that I think are particularly effective are the Robinson and the Winkel Tripel. These have both been used by National Geographic. The former was their default projection until 1998 when they switched to Winkel Tripel, which was originally developed by Oscar Winkel in 1921. Equal area projections are of course used widely (e.g. Gall-Peters) but some suffer from extreme flattening at the poles, like the Behrmann one below. No matter what, none are really 'correct'.










Now I should get back to marking reports!

Wednesday, 22 December 2010

The Size of Countries: USA and China

There have been a few blog posts elsewhere recently about the size of Africa. Kai Krause was the original blogger on this with his 'True Size of Africa' map, which is very impressive. This was picked up by a couple of other blogs, including the Economist's take on it and the Spatial Analysis blog at CASA.


I've recently been looking at this kind of thing from a different perspective but still in relation to the size of countries. Some of this has involved playing around with regions, nations and population data. I thought it would be interesting to look at the USA and China since they are very similar in area but very different in population.

Some images below. Click to view them full size. This first one puts the USA and China side-by-side with population data included and the second one superimposes China on the USA's land area.




Monday, 25 October 2010

Sheffield Deprivation

I've been experimenting with deprivation data (again) and google maps (again). This time I've overlaid deprivation data for Sheffield on to google maps. I did this by using a fairly simple technique, which includes making sure the geographic projection is correct. I've described this before too.

You can pan/zoom on the embedded map below, but to see the full thing you'll need to click on 'View Larger Map'. Once you've done that you can see further information on the left hand side. You can turn layers on and off using the little tick boxes on the left and you can query the map by clicking it.

Not much else to say apart from take a look at the map below.


View Larger Map

Wednesday, 11 November 2009

British National Grid and Google Maps

This post follows on from a recent one about the Scottish Index of Multiple Deprivation 2009 and in particular the interactive mapping function they provide.

The most deprived area in Scotland, according to the new Index, just happens to be centred on Celtic Park, Glasgow. This is, in technical terms, Data Zone
S01003279. But, there's a slight problem - the Data Zones are somewhat displaced. It's not too big an issue in relation to the SIMD data because Data Zones match Ordnance Survey data and the Scottish Government have all this behind the scenes so they do of course know on a street-by-street basis where things are.

However, for the online map interface, it does mean that the Data Zone is not in the right place. It also means that people using the interactive mapping facility could end up thinking they live in one area, when they actually live in another since the level of displacement often moves Data Zones into the wrong street.

So, it got me thinking. What would you have to do to get the Data Zones in the right place on Google Maps (this also applies to Google Earth)? It's quite simple really (if you're a nerd and you have the right software)... N.B. the SIMD data is not based on Google Maps, but rather the Microsoft Virtual Earth mapping facility.

  1. Convert the Data Zone Shapefile from British National Grid to WGS84 in ArcGIS. Best done via ArcToolbox/Data Management Tools/Projections and Transformations/Feature/Project and then selecting the right files for transformation to the correct projection. More useful information can be found here.
  2. Use Kevin Martin's excellent Export to KML tool to convert the Shapefile to KML. You can set transparency here and it will export as a transparent KML layer, as in the maps below.
  3. If you've got a Google account you can then upload the KML file directly into the My Maps facility and the Data Zone appears there. From there you can add a description and edit in other ways.
Here's what it looks like if you don't get the projection right the first time (click the link below the map to see the full thing) - note how the edges of the Data Zone don't match the streets.


View Data Zone S01003279 - Displaced in a larger map

And here's how it looks if you convert to the correct projection before you export to KML (again, click the link below the map to see it full size):

View S01003279 in a larger map

So, a simple bit of GIS work before putting all this online solves the problem.