Saturday 5th November 2011

The Darwin Traverse

It’s always nice to get some feedback on OpenCycleMap – especially when it’s being put to unexpected use. I received this in an email:

We are french Alpinist and we just want to thanks you for your job in open cycle map.
We’ve just finish a traverse in cordillera darwin in chili and we have used i phone with “motion x gps” apps.
on this aps we have acces to open cycle map relief and it was the best map of the region, just some very little mistake.

Teaser english version Darwin traverse from gmhm chamonix on Vimeo.

Wow! Amazing stuff. Thanks to François from the expedition for getting in touch.

Tuesday 25th October 2011

OpenStreetMap usability revisited

At the end of September I took a half-day off from the day job and visited UCL. They were again running an Introduction to OpenStreetMap Mapping Workshop for their new masters students. I went along last year and created some great notes on usability for OSM newbies and did the same again this year. It’s rare for me to be able to watch (and help) so many newbies at the same time.

The main difference between last year and this have been the move to Potlatch 2 as the main editor, so I was especially looking forward to seeing how this performed. Also the students were this year focussing on wheelchair accessibility mapping, which had implications mainly for the detail of our presets compared to this highly-detailed (and relatively unusual) mapping focus.

So here’s the list of notes that I made, in the order that I made them

  1. We need a deselect button. When you have a feature selected it’s not obvious that to deselect you just click somewhere else on the map
  2. The wiki page on wheelchair mapping is unclear about tagging accessibility of toilets when they are in another amenity (e.g. pub) rather standalone toilets (amenity=toilets)
  3. One person triggered EntityUI exceptions when zooming in and out. I was surprised to see the exception showing – normally these only show on debug flash plugins
  4. Still confusion on how to add features that aren’t in the grid of icons (Current solution is to double-click to create a POI, suggestion is to have an “other” poi to drag/drop)
  5. The conflict dialog, which you see when two people edit the same road, isn’t particularly helpful. It only gives the id of the feature, which doesn’t help. There’s no method to reconcile the differences (or even see what they are). Yes/No labels on the buttons are bad.
  6. The backgrounds dialog needs better labels. e.g. “Bing Aerial Imagery” since “Bing” is meaningless
  7. Need to drag/drop “new point” (as above – shows you how often it came up!)
  8. Maybe need a “More…” button on the presets to provide some way to reassure people they aren’t definitive and show them how to figure things out
  9. Click-again (that is, clicking twice slowly) should also create a POI
  10. It’s hard to read the road names, especially when they are at an angle
  11. Duplicate nodes, when shown, aren’t easily figured out what they mean
  12. One person made the advanced tag panel go haywire by having multiple new tag entries – and managed it repeatedly
  13. Wiki documentation on bookmakers still sucks. We ran into this last year – there’s a lot of bookmakers in London, and especially if you know a different term for it (gambling shop etc) the documentation is hard to find
  14. Would be great to highlight mistakes, e.g. tagging building=yes on a node. This happened a couple of times when people had a node of an area selected when they started adding tags
  15. Copying tags from nodes to ways (see above)
  16. Newbies shouldn’t be exposed to the footway vs path controversy on the wiki.
  17. Nobody ever finds the search box on the wiki, especially when they are using browser-based find on the Map Features page.
  18. People accidentally mousewheel out too far repeatedly when editing. Maybe we should prevent it at low zooms
  19. barrier = entrance vs building = entrance is unclear
  20. Nobody reads past the first paragraph of the Key pages on the wiki before just skim-reading the read. Which means sentences like “Some people use the tag ‘foo = bar’ when they should instead use ‘baz = bar’ becomes “….. ‘foo = bar’ ….” and that gets used.
  21. The public transport pages on the wiki are dreadful, and newbies shouldn’t be exposed to two alternative tagging schemes. I have my own views on the whole new pointlessly-incompatible schema in any case.
  22. You can end up with both the rails_port search panel and potlatch 2 open at the same time. If you try closing the search panel you get the “leaving the page” warning, when you aren’t actually leaving the page.
  23. The “loading….” label isn’t obvious
  24. Areas of the map that haven’t yet had the data downloaded could be highlighted (or disabled) so that you don’t think it’s just empty.
  25. We need some way of saying “Zoom in!” when you have too much data showing at the given time and flash is crawling to a halt
  26. The data loading could be improved by having a tile-based map call instead of the current wms-like map call.

Some of these things are familiar from previous user testing, some are new, and some will need a bit of discussion to tackle. This is a good opportunity to plug the upcoming Hack Weekend!

Thanks to Dr Patrick Weber for inviting me along.

Tuesday 9th August 2011

Dealing with GDAL and Mapnik

Getting GDAL and Mapnik to play nice is a complete pain. Now that I’ve managed it, I’ll give you the solution and explain some of the background.

Mapnik has two plugins for reading image files and using them as background in maps. For OpenCycleMap I currently use the “raster” plugin which reads the files directly, and I need to calculate and supply mapnik with all the coordinates for each image. It’s a bit tedious, but when we set up OpenCycleMap a few years ago it was the only way we could get things to work.

Time moves on, and for new projects (and the massive forthcoming OpenCycleMap upgrade) I’m using the “gdal” plugin. This uses the wonderful (but sometimes infuriating) GDAL libraries to read the images and use any geo-information that’s embedded within them. Saves a lot of hassle, and when you’re dealing with tens of thousands of raster images then things like .vrt files are a godsend.

However, gdal has a secret lurking deep within its sourcecode, and it’s all to do with libtiff. libtiff is the library for reading .tif files, which are normally limited to 4Gb in size. There’s a new version of libtiff that deals with giant tiff files that are greater than 4Gb (known as BigTIFF). The version of libtiff that comes with Ubuntu doesn’t have BigTIFF support, so the GDAL packages use their own internal copy of the library. With version 0.8.0 of gdal, a feature was added to throw an error if multiple versions of gdal were found active at the same time (in 0.8.1 this was downgraded to a warning). But for most applications using gdal there’s no big problem – they use the gdal libraries, and hence use the BigTIFF version of libtiff. Meanwhile the standard libtiff (which loads of other things need – trust me, don’t try uninstalling it) is left out of the picture and usused.

The problem is if your application – say, mapnik – compiles against both the system libtiff and gdal-with-BigTiff. If you’re using gdal before 0.8.0 then you might get silent corruption of the output, if you’re using 0.8.0 the mapnik will keep crashing with “ERROR 1: WARNING ! libtiff version mismatch : You’re linking against libtiff 3.X but GDAL has been compiled against libtiff >= 4.0.0″

The trick to this is to avoid using any ubuntu packages of gdal – whether from the ubuntugis PPA repositories or anywhere else – until someone somewhere sorts it all out (probably in some future Ubuntu libtiff will have BigTiff support built-in). In the meantime, grab yourself gdal from source (0.8.0 is fine, btw) and configure it with

./configure –with-libtiff=/usr/lib

This forces gdal to use the system libtiff, and prevents any corruptions or segfaults in applications (like mapnik, which you’ll need to recompile too). It means you don’t get BigTiff support, but hey-ho. But most importantly, you can stop spending all your life juggling gdal versions trying to find which particular combination of packages and PPAs work (hint: none of them do). Thanks to Dane for the final clue – I’ve spent days of my life repeatedly battling this!

Tuesday 19th April 2011

The Problem of Cycle Complaining

I’ve been involved in a small amount of cycle campaigning over the last few years, and one theme comes up over and over. To coin a new phrase – there’s too much “cycle complaining” and not enough “cycle campaigning”. By “cycle complaining” I mean where well-intentioned people just draw attention to problems – poor junction layout, narrow lanes, aggressive driving – without either talking about the good stuff or actually doing anything to help fix the problems they identify. It also gives other cycle campaigners a bad name, since the complainers come across as confrontational and obstructionist, and I only need to read my twitter feed to realise that most times cycling campaigning is mentioned, someone somewhere is complaining about something and concrete suggestions are few and far between.

One example that particularly struck a chord was when I went along to a local campaign group meeting to discuss some new developments our local highways authority (in this case TfL) were making. On one road the proposal was to remove a 1m wide “cycle gap”, and the 3ft steel bollard that was slap bang in the middle of it, and add a proper contraflow cycle lane instead. The campaign group were going to formally object to the improvement since it the resulting lane wasn’t quite wide enough for their liking – despite it clearly being an improvement over what was there already. I was slightly shocked, but on further discussion realised that their position was more of a battle-hardened “cycle complaining” mentality than anything they could rationally justify about the matter at hand. Which got me thinking.

Cycle campaign groups are at a huge disadvantage when discussing plans with local councils. Even when TfL showed us some sneak peaks of the roadway engineering diagrams it was tough for the campaigners to deal with them effectively – they were just printouts, not the actual files; even if they had been CAD files there was nobody there who would be able to examine them or draw the suggested amendments. Ideally a campaign group could respond by saying “here are the places where the proposal doesn’t meet standard X, AND here are our suggestions for improvements we’d like to see”.

This works on a wider scale too. If a council approaches a cycle group to ask where they would like more bike parking installed, the cycle group are unlikely to be able to help much more than just saying “roughly here” (even supposing they maintain a list of sites), rather than “here, have some CAD files for our top ten sites prioritised using density analysis of existing locations” . If a cycle group want to approach a council to convert one-way roads into two-way, they are unlikely to have the traffic simulations to show the five most useful changes. There’s just a huge gulf in tools and technologies available to each side, so when the only way things work is for one side to suggest and the other to accept/refuse, it’s easier to see where so much reactionary complaining comes from.

Enter the guys behind CycleStreets, with their “Helping campaigners campaign” proposal. You can read it for yourself, but in summary is a web-based tool to track, manage and develop solutions to infrastructure problems facing cyclists. While it’s not a panacea for everything I’ve discussed, I think it’s a hugely important step forward for all cycle campaigning groups. Their proposal has been short-listed for the GeoVation awards finals in two weeks’ time and I wish them the best of luck, the funding from that would really kick things off. If you want to show your support then go for it, through your blogs, twitter or however you see fit. Even if they don’t manage the grand prize I hope to see their proposals come to fruition in the near future, especially given their track record of getting things done. I hope to get the opportunity to help their ideas see the light of day – it will be an excellent tool to help turn cycle complaining into the results we want to see.

Monday 11th April 2011

Transport Map

I recently added a new Transport layer to OpenCycleMap, which some of you will have spotted, and I hope you find interesting. The eagle-eyed among you may even have spotted it as one of the maps on Grant’s curious OpenWhateverMap!

Transport Map

I first visualised bus routes in 2008, and ran a few experiments on railways as part of an experiment in terrain maps just over a year ago. In the mean time I’ve had these ideas on the back burner while I focussed on OpenCycleMap, but recently made some space to put them together into a fully-fledged project. I’m not the first to make a transport map, with öpvnkarte being a famous but no-longer-updated example, but the cartography is something personal that I have my own take on and I enjoy the challenge of creating special-interest maps. So while taking a break from terrain-data processing I put the transport map together. There are certain features of the map that are drawn directly from OpenCycleMap, and there are new developments that I will eventually re-incorporate too.

One of the phrases I started using a few years ago is “render and they will map” – or, in other words, if you are interested in a particular aspect of mapping data being improved then the best way to encourage mappers to improve that is to make it visible and useful. Certainly after I started rendering cycle routes their number in OpenStreetMap increased dramatically, and similarly for the other specialist things in OpenCycleMap. I’m hoping that my world-wide transport layer will encourage similar things in the area of transport data such as adding greater detail to railway stations. In the UK we have patchy levels of detail in bus stops and bus routes; even in London many bus stops have obvious errors in their names. I suspect since they aren’t shown on the current mainstream maps nobody is noticing (and hence fixing) the problems, but, over time, the data should mature and the transport map will therefore improve too.

Another aspect of the OSM data is the high level of detail in the data, which can make some mid-range zoom levels incoherent. I’ve tackled these in two different ways – for example, railway yards and sidings can be distracting when looking at inter-city rail corridors, but the transport map checks for the appropriate tags to hide them where possible. However, the tags aren’t widely used at the moment since they aren’t rendered on other maps, but in this way my map will improve over time as the mapping volunteers add ever greater details. In contrast, I’ve used the station buildings to obscure some of the track details at mid-zoom levels, and gone one step further in simplifying the building geometries at the same time – but losing some of the complex detail of OSM can give better cartographic results. I’ve got further examples and some experiments lined up, and if my talk is accepted I’ll be discussing these at State of the Map Europe later in the year.

For now I’m working on speeding up the rendering – this is the first full-blown map I’ve made with Cascadenik and the performance is surprisingly poor. I’ll be trying to nail down what’s causing this and share that with you soon. In the meantime I continue to work on the cartography and I’m interested in your feedback and questions.

Wednesday 6th April 2011

OpenStreetMap Hack Weekend

Last weekend we held another Hack Weekend for OpenStreetMap, and I thoroughly enjoyed it from start to finish. Especially the start, which involved sitting outside on a warm spring evening with a cold beer and unwinding!

This was probably one of the largest Hack Weekends that we’ve ran so far – I counted 25 people at one point – and I volunteered to help anyone who was interested in using git, developing Potlatch2 and improving the Rails Port (aka the OpenStreetMap website). As part of this I ran a few short workshops which were surprisingly well attended – I’d expected 2 or 3 people for each one but ended up with 10-15 each instead! I’ll be interested to see what workshops people are interested in for the next Hack Weekend.

When I wasn’t running workshops or helping other people, I was working with Richard Fairhurst on the Potlatch 2.0 release – and this was the point where we made it the default editor on the OpenStreetMap website. It’s been painful for the last few months watching thousands of people learning to use potlatch1, so we’ve just made a big step in making OpenStreetMap easier to get started with. The news made it onto OpenGeoData and even ReadWriteWeb. Development doesn’t stop at 2.0, of course – we’ve got lots of in-progress work on branches (including the long-awaited History dialog that I’ve been working on) and it’ll be good to see them being merged in when they are ready. We also managed to spot a few bugs within the first few hours of the new release!

It was also great to see a bunch of people committing code to projects they’d never worked on before – one of the main reasons we run the weekends. There was lots of work on the Rails Port, including improving the layout on mobile screens and working round bugs with postgres 9. But I’ve no idea what everyone was up to at the far end of the room – it was such a big, busy weekend that I couldn’t keep track! One thing that was prevalent were people picking up git for the first time, and our recent migration to using git for Potlatch2 proved really useful when juggling which features to include in 2.0 and which to leave for further development.

I’m looking forward to the next Hack weekend, which Matt is already organising. If you’re tempted to come help develop OSM and learn something new, you should come along!