Skip to content

Commit

Permalink
Fix layering order for "construction=*" highway categories (#3646)
Browse files Browse the repository at this point in the history
* Add "construction=" values to z-order table so highway=construction layers properly

This change is in openstreetmap-carto.lua, so it will take effect for new features and after database reload

* Order roads-fill by osm_id last, when all else is equal

This will cause roads to layer consistently between different zoom level, though this will only be visible for highway=construction

Also adjust uncategorized construciton z-order and modify z-order for minor highways

* Remove construction types from z-order lua table

Pending database reload, we cannot yet make changes to the openstreetmap-carto.lua file
  • Loading branch information
jeisenbe authored and matthijsmelissen committed Jan 24, 2019
1 parent d248a9b commit c8e6bc2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,7 @@ Layer:
ELSE 'no'
END AS link,
COALESCE(layer,0) AS layernotnull,
osm_id,
z_order
FROM planet_osm_line
WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))
Expand Down Expand Up @@ -897,6 +898,7 @@ Layer:
ELSE 'INT-normal'::text END AS service,
'no' AS link,
COALESCE(layer,0) AS layernotnull,
osm_id,
z_order
FROM planet_osm_line
WHERE (tunnel IS NULL OR NOT tunnel IN ('yes', 'building_passage'))
Expand All @@ -910,7 +912,8 @@ Layer:
CASE WHEN substring(feature for 8) = 'railway_' THEN 2 ELSE 1 END,
CASE WHEN feature IN ('railway_INT-preserved-ssy', 'railway_INT-spur-siding-yard', 'railway_tram-service') THEN 0 ELSE 1 END,
CASE WHEN access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END,
CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END
CASE WHEN int_surface IN ('unpaved') THEN 0 ELSE 2 END,
osm_id
) AS roads_fill
properties:
minzoom: 10
Expand Down

0 comments on commit c8e6bc2

Please sign in to comment.