Posts Tagged ‘maps’

Making PostgreSQL, PostGIS And A Mac Play Nicely Together

Most things in life are a journey and the destination of this particular journey was to try and create a custom map style that represented the unique features and challenges of Tandale.

Which meant I needed to download and install TileMill, an interactive map design tool.

Which meant I needed to learn Carto, the CSS-like language for map styling.

Which meant I looked for a template project so I didn’t have to start from scratch.

Which meant I found OSM Bright.

Which meant I needed to start small and find a map extract of Tanzania to work with.

Which meant I needed to install and configure PostgreSQL and PostGIS on my Mac.

Which brings me to the starting point of the journey and the reason for this post in the first place.

When I normally need to install UNIX-y command line and server tools I turn to Homebrew, the tool set that “installs the stuff you need that Apple didn’t”. Homebrew supports installing both PostgreSQL and PostGIS but a bit of background research showed that installing these on Lion and on Mountain Lion could be problematic. A bit of further research soon turned up Postgres.app, which claims to be “the easiest way to run PostgreSQL on the Mac”. Postgres.app is a single shot installer which wraps PostgreSQL and PostGIS into an easy to install and run self contained environment.

Postgres.app

I’m a big fan of this approach to a software development environment. All of the stuff I’ve put up on GitHub and on WordPress.org has been written using MAMP, the single shot installer which wraps up Apache, MySQL and PHP on the Mac so Postgres.app gave instant appeal to me. So, download, install, start.

Next I found an OSM map extract of Tanzania courtesy of GeoFabrik, which I also downloaded. Now to load the map into PostgreSQL. I made sure my shell’s PATH pointed to the command line tools provided by Postgres.app by prepending /Applications/Postgres.app/Contents/MacOS/bin to the PATH defined in my .bash_profile, ran psql and created a database called tanzania. So far so good.

$ psql
psql (9.2.2)
Type "help" for help.

gary=# CREATE DATABASE tanzania;
CREATE DATABASE
gary=# \q

To load the map into the database I had a choice of two command line tools; Imposm or osm2pgsql. The latter of the two seemed to work out of the box according to the documentation so I used Homebrew to install this tool.

$ brew install osm2pgsql

Now to load the map …

$ osm2pgsql -c -G -U gary -d tanzania ~/Projects/maps/data/tanzania.osm.pbf 
osm2pgsql SVN version 0.81.0 (64bit id space)

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point" does not exist, skipping
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2 );
 failed: ERROR:  function addgeometrycolumn(unknown, unknown, integer, unknown, integer) does not exist
LINE 1: SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, ...
               ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Error occurred, cleaning up

The lack of the AddGeometryColumn function was the clue here. Whilst Postgres.app may come with PostGIS, my custom database was lacking all the PostGIS functionality. So I deleted my initial database and tried to recreate it with the template_postgis template, which also failed.

$ psql
psql (9.2.2)
Type "help" for help.

gary=# DROP DATABASE tanzania;
DROP DATABASE
gary=# CREATE DATABASE tanzania TEMPLATE=template_postgis;
ERROR:  template database "template_postgis" does not exist
gary=# \q

Updated 24.12.12

As Regina correctly pointed out in the comments, I didn’t really need to go through the manual process of loading the PostGIS template, the create extension postgis command in psql would have done this for me much quicker and elegantly, reducing the commands to setup my database to just two statements …

$ psql
psql (9.2.2)
Type "help" for help.

gary=# CREATE DATABASE tanzania;
CREATE DATABASE
gary=# \connect tanzania;
You are now connected to database "tanzania" as user "gary".
tanzania=# CREATE EXTENSION postgis;
CREATE EXTENSION
gary=# \q

… simple when you know how.

So I needed to create the template_postgis database from scratch, loading in the postgis.sql and spatial_ref_sys.sql SQL files and then recreate my custom database, based on the template contained in the template_postgis database. The PostGIS SQL files are supplied as part of Postgres.app, if you know where to look for them; you’ll find them inside the app’s container in /Applications/Postgres.app/Contents/MacOS/share/contrib/postgis-2.0.

$ createdb template_postgis
$ createlang plpgsql template_postgis
createlang: language "plpgsql" is already installed in database "template_postgis"
$ psql -d template_postgis -f /Applications/Postgres.app/Contents/MacOS/share/contrib/postgis-2.0/postgis.sql 
SET
BEGIN
CREATE FUNCTION
CREATE FUNCTION
CREATE TYPE
...
COMMIT

$ psql -d template_postgis -f /Applications/Postgres.app/Contents/MacOS/share/contrib/postgis-2.0/spatial_ref_sys.sql 
BEGIN
INSERT 0 1
...
COMMIT
ANALYZE

$ psql
psql (9.2.2)
Type "help" for help.

gary=# CREATE DATABASE tanzania TEMPLATE=template_postgis;
CREATE DATABASE
gary=# \q

Now, at last, I was able to load my Tanzanian map.

$ osm2pgsql -c -G -U gary -d tanzania ~/Projects/maps/data/tanzania.osm.pbf
osm2pgsql SVN version 0.81.0 (64bit id space)

Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE:  table "planet_osm_point" does not exist, skipping
NOTICE:  table "planet_osm_point_tmp" does not exist, skipping
Setting up table: planet_osm_line
NOTICE:  table "planet_osm_line" does not exist, skipping
NOTICE:  table "planet_osm_line_tmp" does not exist, skipping
Setting up table: planet_osm_polygon
NOTICE:  table "planet_osm_polygon" does not exist, skipping
NOTICE:  table "planet_osm_polygon_tmp" does not exist, skipping
Setting up table: planet_osm_roads
NOTICE:  table "planet_osm_roads" does not exist, skipping
NOTICE:  table "planet_osm_roads_tmp" does not exist, skipping
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=800MB, maxblocks=102401*8192, allocation method=3
Mid: Ram, scale=100

Reading in file: /Users/gary/Projects/maps/data/tanzania.osm.pbf
Processing: Node(6820k 682.0k/s) Way(980k 16.90k/s) Relation(23580 1122.86/s)  parse time: 89s

Node stats: total(6820388), max(1910954191) in 10s
Way stats: total(980191), max(180648305) in 58s
Relation stats: total(23580), max(2409445) in 21s
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads

Writing way (980k)
Committing transaction for planet_osm_point
Committing transaction for planet_osm_line
Committing transaction for planet_osm_polygon
Committing transaction for planet_osm_roads

Writing relation (23569)
Sorting data and creating indexes for planet_osm_point
Sorting data and creating indexes for planet_osm_line
Sorting data and creating indexes for planet_osm_polygon
node cache: stored: 6820388(100.00%), storage efficiency: 50.68% (dense blocks: 637, sparse nodes: 6403164), hit rate: 99.45%
Sorting data and creating indexes for planet_osm_roads
Analyzing planet_osm_point finished
Analyzing planet_osm_polygon finished
Analyzing planet_osm_roads finished
Analyzing planet_osm_line finished
Copying planet_osm_point to cluster by geometry finished
Copying planet_osm_roads to cluster by geometry finished
Creating indexes on  planet_osm_roads finished
All indexes on  planet_osm_roads created  in 12s
Completed planet_osm_roads
Copying planet_osm_polygon to cluster by geometry finished
Copying planet_osm_line to cluster by geometry finished
Creating indexes on  planet_osm_point finished
All indexes on  planet_osm_point created  in 21s
Completed planet_osm_point
Creating indexes on  planet_osm_polygon finished
All indexes on  planet_osm_polygon created  in 28s
Completed planet_osm_polygon
Creating indexes on  planet_osm_line finished
All indexes on  planet_osm_line created  in 30s
Completed planet_osm_line

Osm2pgsql took 218s overall

One final gotcha awaited though. Restarting Postgres.app later that day made psql fail with an error.

$ psql
psql: could not connect to server: No such file or directory
	Is the server running locally and accepting
	connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

Although Postgres.app was running, it looked like the server wasn’t. Checking the system error logs via Console.app showed me that my newly populated database was running out of shared memory.

22/12/2012 11:05:44.319 com.heroku.postgres-service: FATAL:  could not create shared memory segment: Cannot allocate memory
22/12/2012 11:05:44.319 com.heroku.postgres-service: DETAIL:  Failed system call was shmget(key=5432001, size=3809280, 03600).
22/12/2012 11:05:44.319 com.heroku.postgres-service: HINT:  This error usually means that PostgreSQL's request for a shared memory segment exceeded available memory or swap space, or exceeded your kernel's SHMALL parameter.  You can either reduce the request size or reconfigure the kernel with larger SHMALL.  To reduce the request size (currently 3809280 bytes), reduce PostgreSQL's shared memory usage, perhaps by reducing shared_buffers or max_connections.
22/12/2012 11:05:44.319 com.heroku.postgres-service: 	The PostgreSQL documentation contains more information about shared memory configuration.
22/12/2012 11:20:40.584 com.heroku.postgres-service: server starting

Thankfully this is a known problem; PostgreSQL is really a server application, not a laptop application. The default Mac configuration isn’t enough to support a medium sized PostgreSQL database, but adding the following configuration settings to /etc/sysctl.conf, creating it via sudo if it doesn’t already exist and rebooting solved that final problem.

kern.sysv.shmmax=1610612736
kern.sysv.shmall=393216
kern.sysv.shmmin=1
kern.sysv.shmmni=32
kern.sysv.shmseg=8
kern.maxprocperuid=512
kern.maxproc=2048

TileMill - Tanzania

I now have a working PostgreSQL and PostGIS install, with a map loaded, which TileMill can access. Now all I need to do is learn Carto and actually make the map I originally set out to do … another learning journey has started.

Written and posted from home (51.427051, -0.333344)

Having My Eyes Opened, My Heart Broken And Finding The True Meaning Of Maps In Tandale

In a really perverse way, first impressions were not unlike the opening lines from Will Crowther’s Colossal Cave Adventure game on the PDP-11. But rather than those impressions being this …

You are standing at the end of a road before a small brick building. Around you is a forest. A small stream flows out of the building and down a gully.

.. my first impressions were this …

You are standing in a gap between concrete buildings south of the equator. The sun beats down. Around you is a mass of similar buildings with corrugated iron roofs. A small stream flows in a gully between the buildings. The stream is made up of water and human waste. A river tries to flow nearby, but it’s blocked by tons of rubbish and what water there is is black and bubbles noxiously. The smell is overpowering and overwhelming. People live here.

But this isn’t a game and this place really exists. It’s called Tandale and the polite way of referring to it is an unplanned development. Tandale is almost a city in its own right. It occupies a small area to the North West of Tanzania’s capital, Dar es Salaam. Tandale is an enclave, surrounded by the growing suburbs of Dar es Salaam. In 2002, a census showed there was a population of just over 45,000 people living here. Now, towards the end of 2012, the number must be much much higher.

There really is a river running through the centre of Tandale and it really is full of rubbish and waste, both industrial and human in origin. There’s also a thriving market and a massive open rubbish tip where children play and chickens and goats wander. That a market exists in the midst of Tandale is impressive enough but makes sense, after all, people have to eat. But when you then consider that Tandale market supplies food to a significant amount of the city that surrounds and encloses it. Tandale and Dar es Salaam as a whole have a uniquely symbiotic relationship. There is much irony here.

IMG_7833

Surrounded by parts of Dar es Salaam which show no sign of moving out of the way, Tandale has very fixed borders and is growing by the day. It has nowhere to grow but inwards. So the buildings edge ever closer to the river and the rubbish tip. Look closely and you can see plastic bags and other pieces of trash poking out from underneath the buildings and you soon realise that the rubbish tip used to be much much bigger and Tandale is cannibalising itself, building on the only open land there is. The rubbish tip itself.

Tandale Market, Dar es Salaam

Tandale really exists and my descriptions over the last few paragraphs aren’t in the abstract, formed from impressions gleaned from second hand conversations and research on the interwebs. Those descriptions are real, first hand experience, because at the end of November 2012 I stood in the heart of Tandale, letting all of these impressions wash over me.

There’s an old cliche about a life changing experience, but cliches end up as such because they’re often based in fact. I can say hand on heart that visiting Tandale was one of those very life changing experiences and not, as you might first think, in a bad way at all.

IMG_7801

I stood in the middle of Tandale because I’d been asked by Mark Iliffe and The World Bank to be a judge at the Sanitation Hackathon in Dar es Salaam, or #BongoSafi as the event’s Twitter hashtag described it. Bongo Safi is Swahili for Clean Tanzania, but more about that in a later post. The Hackathon had a strong community theme and a strong mapping theme and was aimed at tackling several problems that places like Tandale suffer from, one of which is what is politely termed open defecation. As a judge, Mark thought it would be a good idea if I actually saw with my own eyes the problems that the Hackathon would be trying to solve. A good idea. That is possibly the understatement of the decade.

You see, most houses in Tandale don’t have toilets, let alone a sewerage system to connect the toilet to. In fact, most houses don’t have a water supply. Fresh water arrives inside the sort of tanker you’d be more used to seeing used to carry petrol in British or in the US and from the tanker, the water ends up in massive black plastic tanks where people can buy fresh, clean and safe water.

There are some public latrines, but like most things in Tandale, they’ve come to be in an ad-hoc, organic, unplanned fashion. But there’s not enough of them by a long long way.

IMG_7802

There are also some wells, but they too have come to be in an ad-hoc fashion. They’re either too close to the latrines but even if they weren’t, the ground water is so polluted and contaminated that the stuff that comes out of the wells may have a composition that’s high in water, but you can’t drink it. It’s an opaque liquid that, if you’re lucky, doesn’t smell too bad. But as drinking water costs, this grey water, as it’s locally called, is what you wash in; your clothes, your eating and cooking utensils and yourself.

And that open defecation? That’s what happens when there’s not enough clean and private places to perform that most basic of human function and that’s why there’s rivers and streams of very human origin running in the open air between the buildings.

Tandale opened my eyes and broke my heart in so many places. There were so many examples of things which were just so damn foreign, but the one that I think will live within me forever, is seeing two of the most beautiful children I’ve seen, who were roughly the age of my children, sitting together playing. Squeals of delight echoed off of the walls that surrounded them and as I approached, they both looked up and smiled big, warm, welcoming smiles. Their toys? The remains of what looked like a broken bottle.

I mentioned earlier that there’s an immense amount of people living in Tandale. It’s these people that not only broke my heart but also made me fall deeply in love with the place. The warmth and welcome that I received from everyone I met was at once an amazing and humbling experience. Whilst I’m sure that my guided tour around Tandale meant that I didn’t meet the less desirable members that any society has, but from early in the morning to late at night, not once did I feel unsafe or insecure. I was certainly regarded with curiosity but never once felt that that curiosity was backed up by anything that could be construed as a threat.

IMG_7829

As an unplanned settlement, Tandale has now been mapped. It needed to be. You don’t need to be familiar with the tale of John Snow tracking down the source of a cholera outbreak in London’s Soho in the 1850′s to realise that the combination of contaminated groundwater, building on a rubbish tip and unplanned latrines and wells in close conjunction to each other is a recipe for human suffering on a scale we simply don’t see where I live in London or even in the United Kingdom as a whole.

But as Tandale is unplanned, it keeps growing, keep changing and keeps morphing. This means that the map of Tandale is a never ending, growing living thing and with help, Mark and the Tandale Mapping community keep doing just that.

Tandale, Dar es Salaam

This isn’t so called crisis mapping in the strictest sense of the term. Tandale doesn’t have the high profile media coverage that Kibera in Nairobi and Haiti have been the beneficiaries of.

Maybe chronic mapping, community mapping or just humanitarian mapping is closer to the spirit of what is trying to be achieved in Tandale.

Tanzania and Dar es Salaam in general opened my eyes. Tandale changed my life, thanks to Mark and Msilikale Msilanga. I want to go back and do what I can to help the humanitarian effort in that corner of the Tanzanian capital. I hope it won’t be too long before I can do just that.

This post has been over two weeks in the writing and it’s still not right. But I don’t think it ever will be. I beg your indulgence for the slightly rambling discourse that you’ve just waded through; I’m still trying to process what Tandale is and what it’s done to me and probably still will be, right up until the moment I set foot there again.

Photo Credits: Myself and Mark Iliffe on Flickr.
Written and posted from home (51.427051, -0.333344)

The Case Of Sandy Island; Mapping Error Or Copyright Trap?

There’s a phrase in Latin that goes errare humanum est which roughly translates as everyone makes mistakes. This is true of so many things and maps are no exception. However much we try to make today’s maps as authentic, up to date and accurate as we can, the occasional mistake slips in; it’s more a case of when rather than if.

But if you find a mistake in a map, is it really a mistake or it is a deliberate error, placed there as a copyright trap to provide evidence of the origin of a copied map? This is a vague area at best. Some map makers are up front about this.

Take the iconic Geographers’ A-Z maps in the UK. Just off of Canynge Square in Bristol there’s a small side street called Lye Close. Or is there? The map says there is but if you go to that location you’ll just find an unbroken row of houses and Lye Close is nowhere to be found.

The Geographers’ company has freely admitted that its maps contain trap streets and Lye Close looks to be one of them. The company mentioned about 100 trap streets in London alone in the BBC program Map Man, broadcast in October of 2005.

But other mapping mistakes are somewhat more mysterious.

In 2009 a phantom town called Argleton appeared on Google Maps. Argleton was in the middle of empty fields close to the M58 motorway in Lancashire. But if you go there now, it’s nowhere to be seen. Mapping error or copyright trap? No-one has yet confessed to Argleton although you’d be forgiven for verging into conspiracy theory territory as Argleton is an anagram of Not Real G.

Then there’s the case of Sandy Island, which apparently lives in the South Pacific, somewhere between Australia and New Caledonia. Go to Google Maps and Nokia Maps and there’s definitely an island shaped blob in the ocean. Yet when scientists from the University of Sydney went to find Sandy Island they found unbroken ocean, over four and a half thousand feet deep.

Mapping error or copyright trap? I suspect the former in this case. There’s a significant difference in putting a copyright trap into a map in a rural area or a small side street in a major city and putting an island on a map that just doesn’t exist. A land based copyright trap probably won’t cause harm, but an ocean based one could, especially given the reliance on marine charts that boats and ships have.

Trap streets and other copyright traps are the mapping equivalent of a Googlewhack. As soon as you know they’re there they usually disappear and are replaced by something else that is as yet unpublicised.

Updated

Thanks to Steve Chilton, Elliot Hartley and Tom Hughes it looks like Sandy Island may well have been an error for over 100 years. The Auckland Museum has maps from 1908 which show Sandy Island.

Pacific Ocean. G9230-1908. Sandy Island.

Written and posted from the Amalfi Hotel, 20 W Kinzie St, Chicago, IL (41.88939, -87.62893)

Of W3G, AGI And Other Geographical Acronyms

In November 2008 I was still working for Yahoo and a fledgling meetup event for people interested in maps, location, geo and mobile started up in London. It was, and still is, called GeoMob. I was at GeoMob’s very first event, talking about Yahoo’s Fire Eagle location brokering platform. Four years later and it was great to go back, see GeoMob still flourishing despite a brief hiatus in 2010, and meet up with a lot of old friends as well as meet some new ones.

And what an evening it was. Truly a veritable feast of maps. David Overton spoke about SplashMaps, his Kickstarter funded project to produce lightweight printable fabric maps for outdoors.

I didn’t think it was possible to map happiness but apparently it is and George MacKerron showed how with the aptly entitled Mappiness project.

Staying with tangible maps, Anna Butler from Wellingtons Travel wowed the audience with her lovingly hand drawn map of the centre of London, styled after the glorious illustrated maps of yesteryear. Almost all the audience immediately added a copy of her map to their Christmas lists en masse.

Awesome hand-drawn map of London is awesome #geomob

And then there was James Cheshire who, along with Ollie O’Brien, runs Spatial Analysis and they’d produced Lives On The Line, a map of the life expectancy of Londoners along the path of the London Underground lines. Not only maps, but Tube maps. What more can you want?

Finally, standing between the audience and a thirst quenching GeoBeer or two, it was my turn. This wasn’t my usual talk. No mapporn. Not even that many pithy or wryly amusing images. Just some raising of awareness for the W3G conference and the AGI. As usual, the slide deck is below and the notes follow after the break.

Read On…

A Year On And Yahoo’s Maps API Finally Shuts Down

Nothing on the interwebs is forever. Services start up and either become successful, get acquired or shut down. If they shut down they usually end up in TechCrunch’s deadpool. The same applies for APIs and when they finally go offline, they usually end up in the Programmable Web deadpool.

YDN Maps Shutdown

At around 1.30 PM London time yesterday, the Yahoo! Maps API got added to the Programmable Web deadpool for good. Despite the announcement I wrote about last year that it was being shutdown on September 13, 2011, up until yesterday the API was very much alive and well and still serving up map tiles, markers and polylines via JavaScript.

Yesterday I was running some tests on the latest pre-release version of Mapstraction, which still supported the Yahoo! Maps API and they were running without error all morning. Then they stopped. The API just wasn’t there anymore.

$ wget http://api.maps.yahoo.com/ajaxymap?v=3.8&appid=(redacted)
Resolving api.maps.yahoo.com... 98.139.25.243
Connecting to api.maps.yahoo.com|98.139.25.243|:80... connected.
HTTP request sent, awaiting response... 503 Service Unavailable

A quick look at the API’s home on the web at developer.yahoo.com/maps/ajax/ shows an update to the previous shutting down message, with developers now being redirected to developer.here.net, the home of Nokia’s new Here Maps API.

So whilst the demise of the Yahoo! Maps API in September of last year proved to be somewhat exaggerated, the plug has now been well and truly pulled.

I’ll always have a soft spot for the Yahoo! API; it was the first mapping API I really cut my teeth on and while things change on the interwebs on a daily basis I can’t help but feel sadly nostalgic.

This does mean that the next release of Mapstraction will no longer support the Yahoo! Maps API, though it will support Nokia Maps and Here Maps. My signed copy of Charles Freedman’s Yahoo! Maps Mashups will also continue to remain on my office bookshelf as a memento.

Written and posted from home (51.427051, -0.333344)

The “Maps As Art” Debate

Ah … art. Art is a contentious area for discussion. One person’s work of art is another person’s random spots of paint on a canvas. As Rudyard Kipling once put it, “it’s clever, but is it art?“.

Even artists can’t seem to agree on this topic. Compare and contrast Picasso’s comment that “everything you can imagine is real” with Warhol’s contrarian stance that “an artist is somebody who produces things that people don’t need to have“.

Now add maps into the equation and you have a debate where people probably won’t always agree. So it was with a conversation on Twitter between myself, Steve Chilton, chair of the Society of Cartographers and psychogeographer Graham Hooper. We were talking about a map like this one …

Graham kickstarted the discussion with a fear that the ultimate map, by today’s standards, is merely more accurate old data in a new format. He’s got a point. A lot of today’s maps, particularly digital ones, do take existing data and put a subtly different slant on the way that it’s visualised. He continued with “surely maps, in the broadest sense, need to add value to what is mapped rather than just copy or repeat it in inferior form“.

Here’s where the debate gets onto thin ice. The notion of what’s inferior is a deeply subjective thing. Likewise, adding value is a much maligned phrase that can mean pretty much anything depending on your interpretation. My ultimate map, if such a thing even exists, will probably differ significantly from yours.

Steve countered with “maps represent the real word, it’s not about being inferior; they can categorise, explain, illustrate and open up that world“.

The map in question is one of those produced by artPause and Graham questioned whether any of these maps “present a new or better understanding, appreciation or awareness of our world“.

I should probably nail my colours to the mast here.

A map can be art. I think I have to side with Steve on this point. Maps as art definitely illustrate our world and they definitely make us appreciate someone else’s view of our world. Yes, they’re produced from existing data, or at least the current data at the time they were made. But if you like maps, you’ll probably like maps as art, even if you sometimes need to put your head to one side, squint a bit and mutter “it’s clever, but is it art?“.

Photo Credits: artPause and Kaptain Kobold on Etsy.
Written and posted from home (51.427051, -0.333344)

Map Nature Or Map Nurture; Are Map Addicts Born Or Made?

I’ve said it before, many times, but I’m a 100% un-reconstructed map addict and make no apology for it. I’ve said this in posts I’ve written on this blog as well as using it as part of my introduction for talks at conferences. This post is a slightly more long winded version of why I am the map addict that I am.

I grew up in the suburbs of London. For as long as I can remember, every week day morning my father picked up his briefcase and walked to the local British Rail station (for this was way before the privatisation of the British rail network) and went to the fantastical place, to a child’s mind at least, called Central London where he worked. He went there on a train. Which was amazing and wonderful to me at the time. I knew he worked in Central London because he had a book of maps of all the streets in Central London. It was old, dog-eared and probably out of date but it made the journey to and from work with him every day and I used to look at it in the evenings, after he’d come home for the day. This mystical and wondrous book was called the London A-Z. It looked something like this.

But what was even more wondrous was that this book of street maps had another map on it. The back cover showed a map of railways which ran under the ground, in tunnels. If trains were amazing and wonderful to me then, trains which ran under the ground in tunnels were a complete revelation to me. This other map, of the trains in tunnels, looked something like this.

I didn’t know about Harry Beck or the history of the London Underground Tube map. All I knew was that this was something almost other-wordly. I fell in love with that map when I was around 7 years of age and I’ve not fallen out of love with it yet (as posts on this blog probably show).

So my father inadvertently introduced me to maps. So obviously a map addict is down to personal experience. It was my father’s London A-Z that made me a map addict. It’s nurture not nature.

Maybe not …

Last weekend I was sorting through a load of boxes that has been in storage since my father passed away. As I’d expected it was a massive lump in the throat affair as I came across things I remember from childhood. Also as expected, I found a whole lot of stuff which I’d never seen before and which, to a small degree, made the knowledge that I had of my father just that little bit more complete. But also, totally unexpected, I found this, from 1939.

Then I found this from 1943.

Now I’m not suggesting for one moment that my father was also a fellow map addict but he’d kept these for over 70 years in his possession so maybe, just maybe, maps meant something to him too.

Maybe, just maybe, there’s some nature at work in the creation of a map addict as was as some nurture. Just maybe.

Written and posted from home (51.427051, -0.333344)

What Do You Call The Opposite Of Mapping?

Dutch computer scientist Edsger Dijkstra, who was awarded the Turing Prize in 1972 is reported to have once said …

If debugging is the process of removing bugs, then programming must be the process of putting them in.

With this in mind, if the process of taking geographical information and making this into a map is called mapping … what do you call the opposite, the process where you take a map and deconstruct it back to what makes up the map in the first place.

Un-mapping? Anti-mapping? De-atlasing? Whatever you call it, you start out with a map and you end up with an oddly compelling form of art. Which is just what French artist Armelle Caron has been doing.

Start with the map. Let’s take a map of Berlin. If you’ve spent any time in this city, the map will look pretty familiar. It’s not the most granular or small scale of maps, but that doesn’t matter. What happens next is most definitely art and is akin to magic.

You take the city apart. Block by block. Then you order the blocks and shapes. You categorise them, sort them, rank them and stack them. And you end up with the complete opposite of a map.

Berlin isn’t the only city that Armelle has turned on its head. There’s also Istanbul, New York and Paris to name but a few. Just take a look for yourself.

I’ve no idea what these opposite of maps should be called, but they’re definitely art in my book.

Photo Credits: Armelle Caron.
Written and posted from home (51.427051, -0.333344)

Map Wars; Are Apple’s Maps Really That Bad?

Making a map isn’t easy. Making a map of streets and land features is hard. Making a map of streets and land features that stays up to date is harder. Making a map of streets, features and places, businesses, services, points of interest is harder still. Making a map of all of the previous that stays up to date is really hard. Making a map with all of the previous, wrapping it up in an app that runs on your smartphone and making it useable is verging on insanely difficult. Yet that’s what Google and Nokia have been doing and with the release of iOS 6, that’s what Apple is now doing as well. So how is Apple doing?

To make a map you need several things. Firstly you need spatial data for the streets and land features. You can either license this data globally from TomTom (TeleAtlas), from Nokia (NAVTEQ) or from OpenStreetMap or you can stitch together data from local and national sources, such as the UK’s Ordnance Survey, and come up with a modicum of a global map. Yes I know that Google now have their own maps, a by product of Google StreetView, but this isn’t global, at least not yet and even Google license map data from TomTom.

Secondly you need non-spatial data. Places, businesses, services, points of interest and the like. Most people license this sort of data from a variety of sources, ranging from the more traditional Yellow Pages companies through to internet data providers such as Factual.

Thirdly, you need satellite imagery. Again, you typically license this from specialist imagery providers such DigitalGlobe.

Fourthly and just as importantly, you need time and you need money. All of this data costs; it’s very expensive, labour intensive and time consuming to put together. You also need to take all of this data, which comes in whole plethora of different forms and make it work nicely together; this is also expensive, labour intensive and time consuming.

Wrap all of this data together in a smartphone app and you should have a working maps app that consumers will find easy to use and which gives them the answers to the questions they typically ask of a map. Back to my original question then, how is Apple doing? The polite answer would have to be … not that well.

Let’s start with a nit-picking point. The app icons from Google and from Apple. Both icons are centred around Infinite Loop, Apple’s HQ in Cupertino, California with the 280 interstate going from East to West and North De Anza Boulevard running from North to South. Maybe it’s just me, but the Apple Maps icon on the right, seems to advocate that you enter the 280 by driving straight off of a bridge carrying N De Anza over the freeway, which does seem a little risky and foolhardy.

But nit picking aside, how does Google and Apple square up and compare. To do this I used my iPhone 4, recently upgraded to iOS 6 alongside my second generation iPad, still running iOS 5 and still with Google Maps as Google hasn’t, yet, released an iOS version of its maps app. I compared three areas I know pretty well. My local neighbourhood in Teddington, South West London, the area of Berlin around the Nokia offices and an area just to the South West of Campbell in California where some close friends live.

Let’s start with Teddington. I’m going to leave out the discussion about the look and feel of the spatial map as this is both subjective and a matter of personal taste. Some people like Google’s map style, some don’t. So I’ll just skip right over that topic.

At first glance, all the usual suspects are there. Roads, public transport, green spaces and a smattering of POIs, at least at this zoom level. To be fair, neither Google nor Apple get it completely right. There’s a restaurant which closed down and reopened a few months back under a different name which, given the challenge around keeping data fresh can be forgiven. But Apple seems to also have places which don’t exist, at least they haven’t existed in the 10 plus years I’ve been living in this neighbourhood.

Switching to the hybrid, map plus satellite imagery, view and Apple seems to be ahead, but this is more a case of differing zoom levels between iPhone and iPad to try and get screenshots that can at least be compared side to side. Both sets of imagery seem relatively fresh, albeit taken at different times of the year.

Overall, both Google and Apple are pretty lacking in the suburbs of London so next I tried a more metropolitan area surrounding Nokia’s office in the central Mitte district of Berlin.

Here both Google and Apple score higher for the amount of POIs on the map and for freshness and accuracy, although Google’s 3D-a-like building outlines still show the old Nokia office with a large car park on the south side of Invalidenstraße, rather than the new office building which is there now.

This lack of freshness on the part of buildings is even more apparent on the hybrid view, showing the state of Nokia’s office construction some 9 or so months ago, again with different imagery between Google and Apple.

Finally, over to California and not that many miles away from Apple’s HQ in Cupertino. Here I’d really expect Apple’s maps to shine, but sadly they don’t. Although again, to be fair, this is also not that far away from Google’s HQ in Mountain View, and neither Google nor Apple shine here, it’s more a case of who shines less.

One thing that my screenshots don’t show is the ease of use. How simple and accurate are these maps to use to find a given street address, postal code or POI. Given that I’ve already found Apple lacking in overall POI numbers it comes as no surprise that searching for a set of local POIs is disappointing on Apple’s map. Both maps find streets pretty well in all three locations, though Apple seems to have problems with street numbers, especially those which contain number ranges, such as 18-24 High Street. Apple also falls down on postal code searches, which is surprising in the UK given that both companies license the Royal Mail’s Postal Address File via the Ordnance Survey.

Back again to my original question … how is Apple doing? When you’re launching a competing product which is meant to go head-to-head with existing competitors you need to ensure that you launch something which is at least as good as your competitors, if not better. When you’re launching a competing product which effectively removes the competitors from the public’s sight, as iOS 6 did with Google Maps, then you need to be better than your competitor. Does Apple succeed in this? No and not by a long margin. You could argue that the maps from Apple and the maps from Google are just about on a par in terms of content in central metropolitan areas, but out in the suburbs, where a lot of people live, Apple doesn’t even come close. Yet.

That’s a key word in all of this debate of Apple vs. Google … yet. Apple have only just launched their maps and haven’t yet had time to put in place all of the data relationships that Google’s maps rely on. Comparing the legal notices for Google’s maps with those for Apple’s maps – shows just how much Apple have to catch up on. I’ll leave it as an exercise to the reader to count how many relationships Google has compared with Apple.

As Charles Arthur pointed out in The Guardian recently, Apple is no stranger to launches and products going wrong. In time, Apple will correct the glaring omissions and errors in its maps and will build up a critical mass of data relationships to be able to go head-to-head with other maps apps on a basis of quantity and quality of data, but right now Apple is using their control over iOS to replace Google’s maps with a sub-par experience. As I mentioned right at the start of this post, making a map is hard and it takes time and it takes money. Apple have the luxury of both. Time will also tell whether Google does launch the rumoured iOS 6 Google Maps app or whether Apple will reject this due to competing functionality with iOS; somehow I doubt they will do this due to the inevitable bad publicity this will undoubtedly generate. But even if Google do launch Maps for iOS6; I cannot help but wonder how many people will jump back to Google maps in favour of Apple’s map, in just the same way that Internet Explorer still enjoys a large installed user base simply because it’s on people’s PCs when they switch it on for the first time.

Written and posted from home (51.427051, -0.333344)

Making Maps Underground

Warning. This post contains a sweeping generalisation. Yes, I know that Places are not just part of today’s digital maps; see the James Fee and Tyler Bell hangout The One Where Tyler Bell Defines Big Data as a proof point. But for the sake of this post, just assume that Places and maps are synonymous.

It’s never been easier to make a map. Correction. It’s never been easier to contribute to a map. Today we seem to be makingcontributing to maps everywhere, even underground, or should I say Underground?

To makecontribute to a map, you used to have to be a professional map maker, with easy access to an arsenal of surveying or an industrial grade GPS.

Then came the notion of community mapping. Be it OpenStreetMap, Navteq’s and Nokia’s Map Creator or Google’s Map Maker, anyone armed with a GPS enabled smartphone, hell, anyone without a GPS, could help make a map.

And now it seems, all you need to do to help make a map is to be somewhere unmapped with some form of internet access, be it a 3G or 4G cellular data connection, or a wifi connection. As part of the London 2012 Olympic Games, some London Underground stations (finally) got wifi access and sure enough, where wifi goes, so does mapping, even platforms on the London Underground.

With apologies to Steve Karmeinsky for exposing part of his Foursquare check-in history.

Written and posted from the Arcotel Velvet, Oranienburger Straße, Berlin (52.52602, 13.38834)