Opened 10 years ago

Closed 5 years ago

#1447 closed enhancement (wontfix)

Render surface=unpaved differently from surface=paved

Reported by: avarab@… Owned by: mapnik-team@…
Priority: major Milestone: Wishlist
Component: mapnik Version:
Keywords: Cc: Kevin, Atkinson, jgc


Currently mapnik renders a highway=* with surface=paved exactly like a highway with surface=unpaved. It would be nice to get a visual distinction between the two.

surface=paved should probably be assumed by default.

Attachments (2)

Unpaved_roads.png (30.6 KB) - added by maratu@… 10 years ago.
Proposed rendering
wiki.jpg (647 bytes) - added by DeanKolt 6 years ago.
One of the key elements here is located in the source code is the fact that cc and bcc are located within as a part of it's header source code.

Download all attachments as: .zip

Change History (22)

comment:1 Changed 10 years ago by steve8@…

Could you give an example of a URL so I can have a look and test a tweak?

comment:2 Changed 10 years ago by avarab@…

Sure, all of these ways are unpaved but adjacent to paved ways of the same highway type:

Tell me if you need any more examples.

comment:3 Changed 10 years ago by maratu@…

What is the current status? I see that there is no rules for paved\unpaved roads in Mapnik Stylesheet.

I suggest to render unpaved roads filled with same color as paved roads, but with dotted border and border color same as "highway=track", and maybe more fat.

Changed 10 years ago by maratu@…

Proposed rendering

comment:4 Changed 10 years ago by maratu@…

  • Priority changed from minor to major

comment:5 Changed 9 years ago by pgf

commenting on Unpaved_roads.png, it's hard to say without seeing an actual map image using that style, so i'll just say that i think the paved/unpaved distinction should be visible at scales where the casing might not be renderable, or discernible. i can't tell whether that proposal satisfies that need or not.

comment:6 Changed 9 years ago by Ldp

  • Owner changed from steve8@… to mapnik-team@…

comment:7 Changed 8 years ago by Kevin Atkinson

  • Cc Kevin Atkinson added

I don't care what style is chosen. But some distinction should be made. I just changed some roads from highway=track to highway=tertiary because they are definitely not tracks, but they are unpaved.

See, and

I'm afraid someone might change these back just so they are rendered differently.

Would a patch to the Mapnik Stylesheet speed this up?

comment:8 Changed 7 years ago by jgc

  • Cc jgc added

An example of standard Mapnik rendering modified to render surface=unpaved differently from surface=paved, along the lines proposed above, is available, for Haiti, for example at:

For easy comparison, standard Mapnik rendering can be seen on the same area by switching base layer.

A large proportion of Port-au-Prince peripheral streets is already labeled with a surface tag. This might be only an early indication of the large proportion of unpaved roads globally, especially in less developed countries.

comment:9 follow-up: Changed 7 years ago by Ldp

Looks good, although somewhat busy. One drawback is the ends of roads lacking casing. Did they attempt to handle that?

comment:10 in reply to: ↑ 9 Changed 7 years ago by jgc

Replying to Ldp:

One drawback is the ends of roads lacking casing. Did they attempt to handle that?

Sorry Ldp, seeing your comment only now.

Yes, I had tried using round stroke-linecap for the casing layer, but this made it appear continuous - instead of dashed as desired. So solving this would probably be more complex (special treatment for ends of roads?), and maybe not worth it.

comment:11 Changed 6 years ago by Zkir

Hi All!

This enhancement is very important, especially for countries where the road classification according to the importance of the road in the road graph is used.

For example, a lot of roads in Russia are tagged as highway=unclassified+surface=unpaved. It would be nice to see them rendered different from just highway=unclassified and from highway=track.

Also, this issue has become even more important now, after OSRM ( has appeared. OSRM does not consider highway=track to be routable, which is correct, because highway=track is understood as agricultural road, not intended for ‘normal’ car.

comment:12 Changed 6 years ago by Davo

I agree with Zkir, its very important that the official OSM map show if a road is unsealed. Here in Australia, we have a lot of unsealed roads and now there are some (really cool) routing engines out there, this is seriously dangerous. I spoke to a routing tool developer who considered things that did not show up on the OSM reference implementation, ie the slippery map, did not matter.

There has quite a fuss recently here in Victoria where some people followed their Apple routing tool's instructions and were, perhaps, lucky to get out alive. I think they were pretty silly but press and police just blame Apple. How long before a similar problem crops up based on OSM ? There are a lot of deaths on record of people heading off down roads that they or their vehicle were not suited for.

Zkir, I disagree when you suggest that highway=track means no conventional cars. Not necessarily the case. But the comment does highlight another issue, the OSM map takes note of tracktype= but only when highway=track. In places like remoter parts of Australia, there are a number of roads defined as 'primary' or 'secondary' that are, "on the ground" tracks and again, people and routing engines need to be warned. While somewhat disputed tracktype was always intended to apply to any road. Highway= describes the purpose of the road, tracktype= describes how well maintained it is.

So, maybe a better approach might be to render any road with the tracktype tag set differently (ie with the dashed casement). I cannot imagine there are any sealed roads with tracktype set. Routing engines, once convinced of the tag's importance might then decide to stop routing at, say, grade2. This might be better than relying on surface= as surface has a range of possible values some of which appear to be unpaved and some paved.

Similarly the OSM map does not take any notice of the 4wd_only tag. Again, this could easily lead to a life threatening situation. But maybe I'll lodge a separate ticket on that subject.

There have been a number of unsuccessful attempts to get better tagging in place and I drafted up something myself but gave up when I saw it was not going to get the necessary support. However, this is far too important an issue to drop altogether so we must work with the tags we have.


comment:13 follow-up: Changed 6 years ago by richlv

keep in mind that "unpaved" does not include gravel/compacted, for example. i believe most people want a distinctive rendering between surface=asphalt/concrete and everything else

comment:14 in reply to: ↑ 13 Changed 6 years ago by Davo

Replying to richlv:

A good point richlv, I guess the spot where we draw the line might vary around the world. I reckon, where I come from, the big boundary is between sealed and unsealed roads. So concrete/asphalt on one side and anything from well made gravel through to really fun 4x4 tracks on the other. In terms of drivability, I think the boundary needs to be where you suggest but just about all printed maps in Australia for example tend to look at sealed - unsealed.

The real issue IMHO is that nothing in this space is being rendered, Mapnik still cannot tell the difference and sooner or later, its going to end in tears !


Changed 6 years ago by DeanKolt

One of the key elements here is located in the source code is the fact that cc and bcc are located within as a part of it's header source code.

comment:15 Changed 6 years ago by gweberbh@…

Please, make this happen urgently in mapnik.

In Brazil we have lots of unpaved highways, some are of considerable importance and with significant traffic.

It is essential that mapnik users can visually distinguish unpaved roads from paved ones. This should cover any type of roads, including residential roads.

I can not stress enough how important this is. Driving on an unpaved road under severe weather conditions can be very dangerous even for 4x4 vehicles. In comparison, knowing if a highway is primary or secondary is totally irrelevant.

One should also consider the multiplicative effect of this change in mapnik since other renderers tend to follow mapnik style to some extent. Therefore, the longer you postpone this change in mapnik the longer it delays others to follow.

Personally, I would consider the lack of visual distinction of paved/unpaved highways a bug and I think it should be treated like one.

I would appreciate if you could put in some effort to make this happen, after all this ticket is open already for 4 years. It cannot be that difficult.

Many thanks for your attention

Gerald Weber

Belo Horizonte, Brazil

comment:16 Changed 6 years ago by lists@…

I suggest that unpaved roads and highways get a definitive brown or grey border, while paved roads and highways should get a definitive black border. Roads and highways where no surface tags exists should be rendered as is, thus we get 3 distinct renderings of highways, untagged surface, unpaved and paved.

For closer zoom other solutions can be added as well to destinguish between asfalt and cobblestones in paved roads, or between different forms of unpaved roads as well.

I see the brown border for unpaved roads was proposed 4 years ago

comment:17 Changed 6 years ago by fernando.trebien@…

The Brazilian community is discussing this issue right now. There is consensus that a visual indication of surface type (at least a difference between paved and unpaved) is much needed. Is there anything that I can do to help you implement this? If I adjust Mapnik's definitions ( and figure out a way to render it, what needs to happen to get the changes applied to the main OSM map?

We all seem to agree that "paved" means "concrete" or "asphalt" and that "unpaved" means anything else. Personally, I think that "paving_stones" and "cobblestone:flattened" are in-between these two classifications with their own characteristics: they can't be driven on at full speed and are slightly dangerous under rain, but are much safer than sand roads. Many streets in Brazilian cities have these two kinds of pavement.

Rendering the border of ways as solid black is a bad idea because that would visually conflict with the current representation of bridges. I would prefer to keep the borders as they are for untagged and paved roads, and:

  • when unpaved, make the border light brown (same color used for tracks)
  • when paving_stones or cobblestone:flattened, render the border with the current color and either dotted, dashed or with some dashing pattern

If this proves too confusing, then I would support, only for unpaved ways (not for paving_stones or cobblestone:flattened), rendering the entire way in very light brown regardless of highway type.

One note: these changes should only apply to ways that are normally used by cars (except, maybe, for highway=pedestrian, for visual coherence). They would not apply to the rendering of steps, footways, cycleways, paths, tracks and bridleways.

Last edited 6 years ago by fernando.trebien@… (previous) (diff)

comment:18 Changed 6 years ago by Linhares

I am another brazilian guy who misses this feature (bug?).

As an example you should look at this map of Haiti. A great work done by HOT.

Regards, Linhares.

Last edited 6 years ago by Linhares (previous) (diff)

comment:19 Changed 5 years ago by Gerald Weber

It would be nice to know if we may expect some progress on this issue.

A lot of people are (wrongly) mapping unpaved highways as track because of this.



comment:20 Changed 5 years ago by pnorman

  • Resolution set to wontfix
  • Status changed from new to closed

The "mapnik" component in trac is for the old XML-based openstreetmap.xml stylesheets which are not deployed on Since June the default style on has been openstreetmap-carto, which has its own issue tracker at

I'm going to go ahead and close this issue as wontfix. Closing it doesn't mean the issue won't be fixed in openstreetmap-carto, just that this ticket is against old unmaintained software that has been replaced and this ticket has zero chance of being resolved.

There is an openstreetmap-carto ticket requesting a distinction between unpaved and paved surfaces at, but please read the roadmap at to understand what issues are an immediate priority.

Note: See TracTickets for help on using tickets.