Join GitHub today
Change z_order of link roads and add tests #374
Most maps prefer placing link roads below non-link roads. This allows them to do so without complex SQL or multiple layer solutions which break layer tag usage.
z_order per layer has also been increased from 10 to 100 to allow for this more fine-grained ordering.
Other types of roads (tracks, paths, etc) have been added. This does not impact those not using z_order for layers with these, but does allow their use.
It also removes highway=minor handling, which is a disused tag.
@math1985, as you are more familiar with appropriate ordering of roads, could you review this? I'd like to deal with #132 for 0.88.0 which is probably coming soon.
I'm not attempting to replicate the osm-carto behavior for railways, as what we're doing with a
The proposed code looks good.
I'd still consider also including z_order for railways. Anyone who wants to order roads and railways properly and who does not want to create 11 layers in the .mml-file for all layers -5 to 5, will have roads and railways in one layer, so the ordering of railways must be set somewhere. The UNION BY is only necessary for these renderings that cover areas that have trams and highways sharing objects. If necessary, renderers could manually exclude trams from the layer (on the cost of ordering problems), like in the old default Mapnik layer, so the UNION BY is not necessary. If UNION BY is not used, setting the order for railways is still useful. I therefore think defining order for railways is useful for many users, and won't harm others.
I'd also include highway=proposed and highway=construction.
z_order is included for railways - see pnorman@a2f5b94#diff-0bc6697e58518b9e4450d6a128bd8790R84
I've had trouble replicating the broken z_order behavior with osm2pgsql master, since osm-carto now works around it. I see that the @yohanboniface's HOT style has problems at http://www.openstreetmap.org/#map=17/51.67413/5.32917&layers=H, so I'll try that.
Sorry, I meant the value added to the z_order, as in this PR. It would be nice if a naive rendering of all roads+railways ordered by z_order would result in railways rendered on top of roads - currently, railways would be rendered below roads.