ISO 3166-1

ISO 3166-1 just trips off the tongue, however it’s one of those standards that underpins a fair amount of daily geospatial traffic that is undertaken on a daily basis. Yes, I’m talking about country codes which Wikipedia helpfully defines as:

ISO 3166-1… defines codes for the names of countries, dependent territories, and special areas of geographical interest

This is important because it is used in so much analogue and digital data exchange between countries, although don’t for a moment think the ISO is the only organisation that defines country codes… but that’s a whole other blog post!

What gets in included in the list is interesting… the criteria for inclusion include member states of the United Nations, a UN specialized agency or a party to the Statute of the International Court of Justice. Becoming a member state of the UN is clearly helpful, although what makes a country is interesting in itself, as well as highly politicised. Palestine is an obvious example, but just look at the UK. The UK is a country, but should Wales, Scotland, and Northern Ireland also be included? For example, they are included for FIFA. The UN loosely uses Article 1 from the Montevideo Convention which outlines four qualities a state should have: a permanent population, a defined territory, government, and the capacity to enter relations with other states.

Anyway, once you are on the ISO 3166-1 list you get 2 and 3 letter codes, along with a 3 digit numerical code. These are maintained by the ISO 3166 Maintenance Agency and, given the above, change regularly. You can view the current list here and subscribe to official updates.

At the RGS we are a membership organisation and take online international payments, so having up-to-date country codes is important. Rather than subscribe to the ISO, we use the UK government Country Register, which includes an update service. It has the ISO-2 letter codes, although isn’t necessarily identical (as it’s countries the UK recognises).

Open Access UK Unit Postcodes

The Ordnance Survey released their Code-Point Open product a few years ago that has the OSGB centroids of the unit postcodes. It’s very useful but is only points - if you want the postcodes areas as polygons then you need to license Code-Point with Polygons (snappily titled!). A number of people have derived unit postcode areas using Voronoi polygons including more recently Mike Spencer with some intro at his Scottish Snow site. It’s worth noting that Voronoi diagrams equally partition space between points and nothing more - they are not equivalent to unit postcodes (which can be arbitrary) but are a reasonable first guess. One dataset worth having for your arsenal of spatial data!

Waldo Tobler

I was sad to see that Waldo Tobler passed away last month - a lifetime geoscientist he contributed huge amounts to computational cartography but will be best remember for the First Law of Geography. Some more details at GeoLounge and in the original paper.

However I love the CSISS Classic which was a tongue-in-cheek experiment with Peter Gould on geocoding. Read it because its wonderfully powerful way of showing students about geocoding. Hopefully we’ll see an anthology of his work in the not too distant future.

QGIS 3 features

QGIS 3 is well and truly out now - download your copy here. And the good folks over at GIS Geography have put together a list of QGIS features that are in the new version. Some of the highlights include 3D (1), coordinate reference bounds (5), geopackage (7), background processing (8), new print composer (13), refined graphical modeler (25), but they are all worth taking a look at as it might just be a solution to the problem you have!

QGIS3 Beta

QGIS 3.0 is well and truly on its way with lots of updates, modifications and new features. Here is a great 24 days of Christmas list. Don’t forget to download the beta, play and report bugs back.

Roger Tomlinson’s PhD Thesis

UCL’s Department of Geography have digitised Roger Tomlinson’s PhD thesis from 1974 and placed it online (see James Cheshire’s blog post). As the grandfather of GIS it makes compulsive reading - although disappointing UCL haven’t placed it on EThOS.

!Get Banging!

That would be DuckDuckGo Bangs by the way! A fantastic way to quickly redirect your search/query to another service - I use !w (wikipedia), !g (Google) and !yt youtube lots. Last year I requested one for my favourite mapping engine Streetmap and lo-and-behold they have release it.

Just search !smap

Links Thursday

A couple of recent links that are worth a punt…

20 FREE Satellite Imagery Data Sources: once you’ve waded through the ads, a really useful list of free satellite imagery sources

London Cycle Lane Map: following the London underground map meme, one in that vein but very pleasing.

OSM then and now

Quite astonishing what 10 years of volunteered mapping can do…. wonderfully exposed at OSM Then and Now. Use the slider and be amazed!! Ive centred upon Bletchley, a suburb of Milton Keynes, and home to Bletchley Park and the home of the codebreakers.

xkcd’s bad map projection

The timezone world according to xkcd

<

p>

Geosheets tutorial

GIS-Geography had a nice geosheets tutorial just before Christmas which is worth a look-in. Geosheets is not a service I had seen before and operates as a plugin for Google Sheets, adding functionality to geocode spreadsheet data and plot on a basemap. Of course ArcGIS Online and, indeed, Google MyMaps. However Geosheets offers you the ability to create within Google Sheets itself using some simple syntax. I wonder if they have enough to survive (don’t complete with Google or Esri!) but, in the interim, it’s another toolbox for geoenthusiasts.

Journal of Maps Best Map 2016 (FREE to view)

It is with great pleasure that I am able to announce the award of the 2016 “Best Map” to Bernhard Jenny (RMIT University), Johannes Liem (City University London), Bojan Savric (Esri Inc) and William M. Putman (Goddard Space Flight Center) for their animated map visualizing a year of changes to Earth’s CO2 titled “Interactive video maps: A year in the life of Earth’s CO2”. When the map is first loaded it appears as an animated map of the world showing just how dynamic this part of the Earth system is. But interact with the map - you find it’s pannable and zoomable - all other ways of interacting with 4D data seem mundane in comparison.

The awards committee noted the remarkable interactive animation; something that both tells a story and allows you to investigate. A big leap forward for interactive cartography, drawing the viewer in and allowing them to formulate potential global implications. For these reasons it is a deserving winner of this year’s award.

A small problem of generalisation and a bigger problem of topology

I was recently teaching a class on introductory cartography where we were using a range of different socio-economic datasets including 2011 counties and middle super output areas (MSOA) of the UK from the UK Data Service. These are (helpfully) made available in a range of different formats including the ubiquitous shapefile. These are helpful for choropleth mapping of socio-economic (census) data, use as location maps and when clipping other datasets for including topographic data on maps (e.g. Meridian 2).

One student wanted to generalise the polygons for the location map - thinking this would be easy he went ahead and ran the toolbox tool but end up with lots of sliver polygons as a result. Crucially, as a shapefile doesn’t store topological relationships, the tool was generalising each polygon separately resulting in a very poor output. And this was exacerbated by the fact that the borders were provided pre-generalised.

The obvious solution is to use a topological version of the data - which isn’t provided. The next step is therefore to create the topology in ArcGIS before generalising it. And whilst not difficult, it is a little convoluted to achieve! I found this page particularly helpful and it provided the core of processing (and remember, as with all computing instructions, you need to follow it to the letter!) which can be carried out in ArcCatalo. In short, the steps are:

1. Create a new geodatabase (either file or personal)
2. Create a new feature dataset within that
3. Import the shapefile into the feature dataset
4. Create new topology in the feature dataset
4a. For the topology you will need to use two rules: (a) no gaps and (b) no overlap
4b. This will throw an error where you have coastlines because (obviously) you have a gap!
5. At this point you now have built topology for the dataset and you can proceed to simplify/generalise the borders. Note that there will be multipart polygons present and if (like me) you want to delete any small islands to clean up data for use as a location map then you will need to run the “multipart to singlepart” toolbox tool.

This all proved a little more long-winded than I was expecting, but such is the price of topology! That did make me wonder if I could (easily) do this in QGIS and my initial research suggests not. Yes, the latest versions of QGIS have the Topology Checker Plugin (built-in) which checks topology (doh!) but as far as Im aware there is not an open source file format that supports topology. The grown up solution would be to use a PostGIS/PostgreSQL database but this isn’t particularly useful when you want to distribute data. If anyone knows better (or can correct me) then please do get in touch!

A tale of six maps…

… and the stories they tell. The Washington Post ran a nice story earlier this month mapping the extent of infrastructure in the US. This is in response to Donald Trump’s (sketchy) plans to invest in infrastructure projects. This was subsequently followed up with a nice blog post on how they were created and, in particular, the courses of data and an idea of the data wrangling going on behind the scenes. What’s telling here is the simplicity of the rendering and that journalists use QGIS because its free, but that Photoshop and Illustrator (rather than GIMP and Inkscape) are still the graphic artists tools of choice. I wonder if this would be any different if there was GIS expertise on their teams to support the graphic designers…

Shapefile or geodatabase?

A nice overview and comparison of the shapefile, personal geodatabase and file geodatabase over at the guys at GIS Geography. Its a good succinct summary and review of the pros and cons. They do note that the file geodatabase is proprietary (to Esri), but not that the shapefile is too. And whilst (quitea while ago) Esri published a whitepaper detailing the specification of the shapefile its worth noting that they have released the API to the file geodatabase as well.

Get ahead in QGIS …

I’ve already blogged about Steve Bernard’s excellent YouTube Channel on QGIS, well to continue in that vein, here’s a link to a series of free (and paid for) courses in QGIS over at GeoAcademy. I cant vouch for the courses themselves, but it’s great to see such variety springing up. QGIS is my goto for geoprocessing on a daily basis…

Cartography Links

This week a selection (well list!) of two relatively recent resources which struck a chord.

1. cartographic-design: this is hosted over at Github and is a series of links to cartography sources that supported Maptime Boston’s May 2016 meetup. Its a relatively short but extremely useful set of resources for this wanting slightly more detail on a range of carto/design topics. One to refer back to - often.

2. Beyond the Core Knowledge: a blog post from Gretchen Peterson that looks at some important topics that sit outside (for example) The GIS&T Body of Knowledge. It’s interesting because it takes a concept, a dataset and the hoops to jump through to get (more or less) through to the end. And it’s nice because she covers all those inner decisions you end up making as a designer to get to the final product.

Swiping in QGIS

I quite often find myself compare two images or a vector layer overlying a raster layer and, for me, a swiping tool is tremendously helpful in doing this. Its now also commonly deployed as a javascript tools in web browsers to compare before/after images as well. ERDAS Imagine has had such a function since the year dot. So it was disappointing to see that it isn’t natively part of QGIS - but heck, it is one of those nice-to-have bells and whistles. But actually, it turns out that the MapSwipeTool does just this - although its classed as an “experimental” plugin so you need to make sure these are loaded into the plugins (just change the plugin settings).

Once installed, select the swipe layer and start the plugin. This will then be revealed/hidden from the underlying layers.

Give a beep…

Give a beep is a great example of citizen science, geographically volunteered information and the ability of everyday “users” to influence politicians. Cycling is big in London - very big. Wikipedia shows the number of journeys per day doubling between 1999 and 2014 (over 600,000) with the ratio of cars to bikes dropping from 17:1 to 1.7:1 by 2016. Cycling is quicker, cheaper, healthier… and enjoyable. Why drive? Well, one aspect is safety. As Wikipedia again show, recorded accidents have dropped for the first time in 2014 and whilst relatively low the fear of an accident is a big part of this.

Enter Hovding (yes, those of bike airbag fame), ably assisted by the London Cycling Campaign, have teamed up to find out where and when people feel unsafe. Using the low cost, low power, Flic (how many uses can you think of for this little puppy?!), mount it on your bike, pair the low-power Bluetooth button with you phone and then, every time you hit the button it sends an email to the Mayor of London with you location and time. And, by also storing that information online they produced an interactive map of “fear”.

OK, the mapping is nothing to shout home about (seriously Hovding…. can we move away from the yellow meme??) but the simplicity of use and application to a real world issue where cyclists can genuinely feedback in to policy is great.

After the initial trial of 500 users is being rolled out to anyone wanting to use it - just buy a flic and give-a-beep (how long before every taxi has a jump-the-light flic for reporting cyclists!!).

Historic London Underground

I was at the London Transport Museum in Covent Garden recently and saw a nice animation of the historical development of the network. With all the underground mania in mapping, I liked this because it’s one you see much less often and provides a nice historical perspective on the growth (and decline) on parts of the network. I couldn’t find the animation that TfL used, but did come across the site of graphic designer Doug Rose who has produced a similar animation. So click here to view the map itself which (unfortunately!) uses Flash video. Quite fascinating.