gravitystorm/openstreetmap-carto — pull request #35 by danstowell (2013-02-03 17:58:11+00:00)
Title: Instead of ::railway, coalesce railway=x as highway=railway_x

Andy - this patchset is my fix for layer-ordering within #minor-roads-fill. As discussed, I did this to the layer's styling/sql:
(1) remove ::railway attachment
(2) add sql to order by layer
(3) use coalesce to combine into one column, to avoid mapnik-xml combinatorial explosion.
This last step may or may not have been as you imagined -- I have not renamed "highway", and I have left "aeroway" as being transparently mapped to "highway". The only name-change I made was reworking railway=x as highway=railway_x. The coalesce simply chooses highway then railway then aeroway, which appears to match the stylesheet ordering, though it's possible there's a consequence I've overlooked. Anyway, patch is for your contemplation.

For me, this patch fixes issues such as the tube (layer=-2) failing to draw underneath the roads (layer=null), eg here http://osm.org/go/euu6lSe_I-- (fine in "old" osm render)