Hill Colouring on the Cycle Map

Hill colouring

Last week, in amongst a bit of a hosting problem, hill colouring went live on the cycle map. And it looks awesome!

Having something more pleasing than a flat grey background really helps put flesh on the skeleton of the contour lines, but it means that some stuff needs tweaking to fit. You can see the lovely new forest and wood styles on the image below – my very own forest pattern symbol, with a subtle green tinge and a solid border. The same area before can be found (here).

After hill colouring

But wait – there’s more! In city centres, cycle routes can get quite complicated, and in some places have to go down one-way roads. You then end up with links that are only supposed to be followed in one direction – if you go the other way you might end up facing a no-entry sign (that you’re not really supposed to blithely ignore, politicians too for that matter). So you might end up with a confusing array of cycle routes, such as in central London:

Directional cycle routes - before

… but no longer. The swiss-army-knife-like ‘relations’ to the rescue, which can give pointers as to which way you’re supposed to go. That gives us …

Directional cycle routes - after

(Click the pictures for more detailed lovelyness!)

But wait, that’s not all. Maybe your area doesn’t have any signed cycle routes and no cycle paths either. Or maybe you’ve got both, and also want cycle lanes marked. A nice little bit of blue casing on either side of the road shows which streets have cycle lanes.

Cycle Lanes

And finally, the icon wizardry of Matt Amos has helped me out with showing more useful points of interest – we now have drinking water locations shown (here in Trento, Italy):

Drinking water

… which are probably a better idea than going to a pub. But what’s better than going to a pub for a nice refreshing beer? Well a pub with free wifi, of course!

Free Wifi

And there’s been a million and one places added to the cycle map too, but far, far too many for me to list here. Enjoy!

30 thoughts on “Hill Colouring on the Cycle Map

  1. LH

    I don’t know whether you really need to render the perimeter of forests. Surely there could be a clear border in nature between a forest and some other area but that isn’t always the case.

    Traditional maps tend to show the woods (with abstract tree symbols), and when there’s a clear border – only then – show a line between woods and and other features such as fiels etc.

    Looking at the second image of your post, it could actually be better not to render a border between woods and everything else. The tree symbols themselvels are enough of a mark of woods and the line can easily be mistaken for a contour.

    But anyways, this looks really great.

  2. Andy

    It’s a cartographical choice really – with the translucent hint within the forest area it looked a mess not having a peripheral border – it was confusing to the eye.

  3. Richard Fairhurst

    w00t! Utterly awesome in so many ways. Sustrans is going to want to poach you from CM at this rate…

    Hope you’re going to give us mere mortals a primer on how to do the relief shading.

    Now the shading’s there, I think you could probably turn off the actual contours on the small scale maps – say, zoom 11 and below; the dark green tends to overpower the light grey of the (non-cycle route) minor roads.

  4. Luke W

    Hey Andy. Just wondering if you know why Australia is the only region which has not been updated with the new rendering rules. The old green lines are still showing. Will this weeks weekly refresh rectify this, along with the lack of low scale coverage in the major cities. Thanks.

  5. Andy

    Luke W – the lack of hillshading is an embarrassing logic failure in the code (works fine for north of the equator…) so that’ll get fixed this week. As for the cities, you’ll need to tell me which ones have significant cycle features in OSM and I can add them – but be aware the zoom levels are limited all over the world, not just in Australia.

  6. dave

    I’m also wondering about bus lanes that can be used by cyclists and a) how to mark them up to reflect both the bus, taxi and bike access as appropriate and b) if they’ll show up on the bike map

  7. Peter Miller

    Lovely new rendering. A few requests…

    There are two highway tags that I am using that would be handy to see on the maps. I have started using highway=path as the default for paths in the countryside and have started using highway=road when I have been creating roads from NPE to signal that they need to be checked locally, to both see that they still exist and also what would be a appropriate classification. Could you render these? Possibly you could check if the path has ‘bicycle=yes’ could you render it as a cycle route if it has, and as a footpath otherwise

    Regarding cycle lane casings: will you soon be able to render casing correctly for a cycle lane that is on only one side of the road?

    Crossings: The round blob was a good start but isn’t very intuitive. Could you try putting a pinch point in the road somehow, or a line across the road. I think these would be more understandable.

  8. Andy

    dave – the triangle thing is a coastline bug – these things usually come and go as the underlying data changes.

    Peter – ah, the path/road debate. Personally I’m not seeing much advantage to using them, but if they become popular enough they’ll end up in there somehow. Most likely Dave Stubbs’ osm mangling extension for osmosis will come in handy to stop the filter rules becoming insane.

    Regarding casings – firstly no, there’s no way to render asymmetrically in mapnik, as far as I’m aware. And anyway, there’s no way to tag which side of the road the lane is on. At best you could assume opposite_lane is on the side of the road you would expect oncoming traffic from – but which side is that?

    Crossings – they could get a revamp, but until someone comes up with a way of rotating pointsymbolizers based on a way (i.e. the canal lock problem Steve Chilton described at SOTM) then any symbol needs to be either “upright” or rotationally symmetric.

  9. andylockran

    Really, really interested in this project. How are you guys collaborating on developing this. I’ve been lending my neo out to other developers/marketeers in the hope of enticing a few more people to try it out.

    I can’t wait to get it back this week and try out this software. I’ll be putting up lots of cycle routes.

  10. Richard Fairhurst

    One I keep forgetting to mention: when a way is both NCN and RCN, the colouring should be red, not blue, I guess. It seems to vary at present: and at the same time, it’s fairly common to see the line in one colour but the ‘shield’ in another, which looks a bit weird. NCN68/RCN20 north-east of Kendal is a good example.

  11. Andy

    Andy – Glad to see that you’re interested. Most of your questions will be answered by finding out about the OpenStreetMap project – the cycle map is built on OSM data as its foundation.

    Richard – Absolutely, at the moment at low zoom the cycle routes are drawn in the order they are returned from the db – so it’s a bit sporadic. I’ll try to order them so that they are drawn deterministically.

  12. peufeu

    This is going to be awesome.
    I must look into how to update the maps for my area to participate !!
    My pocket GPS-PDA supports OpenStreetMaps and it will download the maps via WiFi, that’s really useful.

    Anyway, I propose to add information relevant to cyclists to the maps. For each segment of road, this would only be two scalar values :

    1. Safety
    2. Type of road

    Details :

    1. Safety for cyclists.

    This could be reflected by the coloring of the road on the map, on a scale like :

    0 – Forbidden to cyclists, or really dangerous road : highways, speedways, etc.
    1 – Dangerous : road with lots of traffic and no bike lane. Or, dangerous blind intersections, multiple obstacles on bike lane like bollards, etc.
    2 – Average : Your average, narrow city street (50 km/h) with traffic and no bike lane, where width is not enough for safe overtaking of a cyclist.
    3 – Rather Safe : a street wide enough for cars to safely overtake cyclists, or perhaps with a slightly narrow bike lane.
    3 – Safe : Any road/street with very very low traffic, or a with a good wide bike lane.
    4 – Really safe : Where you’d go cycling with your 6 year old children, no cars, good visibility. For instance, a dedicated bike road, a road inside a park, etc.

    Some intersections could also benefit from a danger rating…

    This way, a cyclist could build a route, perhaps considering a detour to avoid a non bike-friendly section of road.

    2. Type of road

    0 – Very difficult mountain bike trail (steep, trial-ish, you fall-you die)
    1 – Average difficulty mountain bike trail (downhill less than 50 km/h, few jumps, rocks no higher than 10 cm, uphill less than 10% slope)
    2 – Typical gravel road, fire road, single track
    3 – Good quality offroad like small smooth gravel, or destroyed asphalt with lots of potholes
    4 – Rather bumpy asphalt
    5 – Average asphalt
    6 – Super smooth asphalt

    The idea being that depending on the type of bike you have, you can select which route to use. For instance you have a road bike, you’ll only want to use types 4-6 whereas if you have a hybrid you’ll also use type 3 and bits of 2, and if you have a full suspension MTB you’ll use them all perhaps.

    If you OSM wizards are interested by the idea I can write a detailed help page with examples and pictures to allow people to rate the cyclability of roads.

    Thanks 😉

  13. Andy

    peufeu – I think you need some more practise with OSM first – we do things quite differently from many other sites. Because we have full access to the underlying geodata we don’t need to “summarize” things into a fixed scale – we can specifically mark features like bike lanes and surfaces on an individual basis. It then lets any consumer of the data, like my map or a routing program or a different website, choose how to combine those objective facts into a subjective measure of cyclability.

    Have a go with OSM, and you’ll see what I mean.

  14. peufeu

    Hehe, your feature made me so enthusiastic that I had to talk before thinking, lol.
    I read the guide, it’s a bit messy ;)… I’m trying to use my GPX trails to update the maps for my city (Lyon)…

    Anyway I see you already have a “surface” key, but what I meant is, in order for the data to be usable by automatic tools like routing programs, it should only allow specific values, that have a well-specified and known meaning. It could be keywords instead of numbers (I was only using numbers as an example). And there should be an easy way to edit and enter those specified values to avoid errors and data pollution… which is the worst thing that can happen to a database, inaccurate data, or data of unspecified meaning, being entered…

  15. Richard Fairhurst

    peufeu: Though users are free to use any tags they want, there’s a list of the most commonly used keys and values on the OSM wiki – it’s called ‘Map Features’. It’s not the be-all and end-all of OSM tagging, but it’s a useful resource. At present the surface tagging hasn’t been well developed, so if you’d like to start a discussion and make some suggestions, go for it!

    As for editing, yes, absolutely: a future version of Potlatch (the online editor) will offer an easy interface so that, if you like, you can choose from preset values. But that said, we never have enough developers for all the things we want to do…

  16. Andy

    Mark – absolutely. It’s just that mapnik doesn’t yet do raster-source interpolation (or rather it just does nearest-neighbour) so when it’s turned on at high zoom you get giant pixelated squares – and it looks pretty terrible! I’m sure mapnik will get some smoothing at some point soon.

  17. Mark Coley

    So that’s how you’ve done it! I had presumed you’d drawn the contours then filled in space between them in different colours, in which case colouring in at higher zoom levels may have been trivial. On the highest zoom that is still coloured (see my link above) you can see the nearest-neighbour interpolation if you look carefully, so I can imaging what it would look like if zoomed in even more.

    It would be good if the height data went to zero at the coastline – I wonder if anyone has linked the OSM coastline data with the SRTM data to force it to be correct (this would necessitate some smoothing at the edges of course).

  18. TEL

    I would like to see some things in the map:
    Streets, Footways and Path (and maybe all other Objects) with bicycle=yes should be highlighted.
    Streets with cycleway=track should be highlighted.
    highway=path should be visible.

    How should i tag a Pub with free wifi?

  19. Lunken

    Very nice indeed.
    I exported the cycle map to .img format för my garmin and it turned out good. Bu hos do I do to export the hill contours? Srtm2Osm???

  20. Pingback: Recent Links Tagged With "cycle" - JabberTags

  21. Sorin Acela

    Hi there.
    1. At closer zoom levels it’s frequently impossible to tell if the road/way goes downhill or uphill, as the altitude tags aren’t relative to the current view.
    2. Why don’t Cycle Map render the “highway=PATH” OSM-tag? Many “paths” are good and desirable for biking.
    Could you solve that?

  22. Jesse

    Question: How did you render hillshading for such a large area (whole world)? Did you point the mapnik tiler to dynamically generated osm.xml files, each of which pointed then to an area-specific GeoTIFF?

  23. Lutz

    Could you please include “highway=path”, at least those which also have “bicycle=yes” or “bicycle=designated”? This seems to be the recommended tag for ways in germany which can and should be used by bicycle. So without it the opencyclemap is nearly useless in germany.

Comments are closed.