From 6ffb89acfe7881c46948a835bbc226668a08a0f6 Mon Sep 17 00:00:00 2001 From: Math1985 Date: Wed, 9 Apr 2014 01:27:22 +0100 Subject: [PATCH] Render oneway roads narrower Render oneway roads narrower than twoway roads for the types motorway, trunk, primary, secondary and tertiary. This is accomplished by making twoway motorways wider and oneway trunk/primary/secondary/tertiary roads narrower. More important road types are now always rendered wider than less important road types. Changes: - Twoway motorways are rendered wider - Oneway trunk/primary/secondary/tertiary roads are rendered narrower - Secondary is now narrower on z13/z14 - Tertiary_link is now rendered just like tertiary - Round line caps on tertiary and larger are removed on regular roads to prevent #83 All other road types are rendered as before. Further changes to the width of link roads are left for a future pull request. I tried to achieve the goal of making more important road types wider than less important ones while at the same time making as little changes to the roadsizes as possible. I think it would be worth for if someone with feeling for design has a closer look at the sizes as we have them now. It should be very easy to adapt now: one can just change the variables in the beginning of the style. I put the road sizes in a kind of table to make them more legible. If people think that's not practical, I can change it back to a list again. This pull request resolves #265 and #83 on Github and 1952 on trac. --- project.mml | 8 +-- roads.mss | 167 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 131 insertions(+), 44 deletions(-) diff --git a/project.mml b/project.mml index 7082f69d30..86f1200570 100644 --- a/project.mml +++ b/project.mml @@ -420,7 +420,7 @@ ], "Datasource": { "type": "postgis", - "table": "(select way,coalesce(('highway_' || highway), ('railway_' ||(case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text when (railway='rail' and service in ('spur','siding','yard')) then 'INT-spur-siding-yard' when railway in ('light_rail', 'narrow_gauge', 'funicular', 'rail', 'subway', 'tram', 'spur', 'siding', 'monorail', 'platform', 'preserved', 'disused', 'abandoned', 'construction', 'miniature', 'turntable') then railway else null end)), ('aeroway_' || aeroway)) as feature, horse, foot, bicycle, tracktype, case when access in ('permissive') then 'permissive'::text when access in ('destination') then 'destination'::text when access in ('no', 'private') then 'no'::text else null end as access, construction, case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service, case when oneway in ('yes', '-1') and highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified','road','service','pedestrian','raceway','living_street','construction') then oneway else null end as oneway, case when layer is null then '0' else layer end as layernotnull from planet_osm_line where (highway in ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'road', 'unclassified', 'service', 'pedestrian', 'living_street', 'raceway', 'bridleway', 'footway', 'cycleway', 'path', 'track', 'steps', 'platform', 'proposed', 'construction') or aeroway in ('runway','taxiway') or railway in ('light_rail', 'subway', 'narrow_gauge', 'rail', 'spur', 'siding', 'preserved', 'funicular', 'tram', 'monorail', 'platform', 'miniature', 'turntable', 'disused', 'abandoned', 'construction')) and (tunnel='yes' or tunnel='building_passage' or covered='yes') order by z_order) as tunnels", + "table": "(select way,coalesce(('highway_' || highway), ('railway_' ||(case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text when (railway='rail' and service in ('spur','siding','yard')) then 'INT-spur-siding-yard' when railway in ('light_rail', 'narrow_gauge', 'funicular', 'rail', 'subway', 'tram', 'spur', 'siding', 'monorail', 'platform', 'preserved', 'disused', 'abandoned', 'construction', 'miniature', 'turntable') then railway else null end)), ('aeroway_' || aeroway)) as feature, horse, foot, bicycle, tracktype, case when access in ('permissive') then 'permissive'::text when access in ('destination') then 'destination'::text when access in ('no', 'private') then 'no'::text else null end as access, construction, case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service, case when oneway in ('yes', '-1') and highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified','road','service','pedestrian','raceway','living_street','construction') then oneway else 'no' end as oneway, case when layer is null then '0' else layer end as layernotnull from planet_osm_line where (highway in ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'road', 'unclassified', 'service', 'pedestrian', 'living_street', 'raceway', 'bridleway', 'footway', 'cycleway', 'path', 'track', 'steps', 'platform', 'proposed', 'construction') or aeroway in ('runway','taxiway') or railway in ('light_rail', 'subway', 'narrow_gauge', 'rail', 'spur', 'siding', 'preserved', 'funicular', 'tram', 'monorail', 'platform', 'miniature', 'turntable', 'disused', 'abandoned', 'construction')) and (tunnel='yes' or tunnel='building_passage' or covered='yes') order by z_order) as tunnels", "extent": "-20037508,-19929239,20037508,19929239", "key_field": "", "geometry_field": "way", @@ -676,7 +676,7 @@ ], "Datasource": { "type": "postgis", - "table": " (select way,coalesce(('highway_' || highway), ('railway_' ||(case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text when (railway='rail' and service in ('spur','siding','yard')) then 'INT-spur-siding-yard' when railway in ('light_rail', 'narrow_gauge', 'funicular', 'rail', 'subway', 'tram', 'spur', 'siding', 'monorail', 'platform', 'preserved', 'disused', 'abandoned', 'construction', 'miniature', 'turntable') then railway else null end)), ('aeroway_' || aeroway)) as feature, horse, foot, bicycle, tracktype, case when access in ('permissive') then 'permissive'::text when access in ('destination') then 'destination'::text when access in ('no', 'private') then 'no'::text else null end as access, construction, case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service, case when oneway in ('yes', '-1') and highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified','road','service','pedestrian','raceway','living_street','construction') then oneway else null end as oneway, case when layer is null then '0' else layer end as layernotnull from planet_osm_line where (highway in ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'road', 'unclassified', 'service', 'pedestrian', 'living_street', 'raceway', 'bridleway', 'footway', 'cycleway', 'path', 'track', 'steps', 'platform', 'proposed', 'construction') or aeroway in ('runway','taxiway') or railway in ('light_rail', 'subway', 'narrow_gauge', 'rail', 'spur', 'siding', 'preserved', 'funicular', 'tram', 'monorail', 'platform', 'miniature', 'turntable', 'disused', 'abandoned', 'construction')) and (tunnel is null or not tunnel in ('yes','true','1')) and (bridge is null or not bridge in ('yes','true','1','viaduct')) order by z_order) as roads", + "table": " (select way,coalesce(('highway_' || highway), ('railway_' ||(case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text when (railway='rail' and service in ('spur','siding','yard')) then 'INT-spur-siding-yard' when railway in ('light_rail', 'narrow_gauge', 'funicular', 'rail', 'subway', 'tram', 'spur', 'siding', 'monorail', 'platform', 'preserved', 'disused', 'abandoned', 'construction', 'miniature', 'turntable') then railway else null end)), ('aeroway_' || aeroway)) as feature, horse, foot, bicycle, tracktype, case when access in ('permissive') then 'permissive'::text when access in ('destination') then 'destination'::text when access in ('no', 'private') then 'no'::text else null end as access, construction, case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service, case when oneway in ('yes', '-1') and highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified','road','service','pedestrian','raceway','living_street','construction') then oneway else 'no' end as oneway, case when layer is null then '0' else layer end as layernotnull from planet_osm_line where (highway in ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'road', 'unclassified', 'service', 'pedestrian', 'living_street', 'raceway', 'bridleway', 'footway', 'cycleway', 'path', 'track', 'steps', 'platform', 'proposed', 'construction') or aeroway in ('runway','taxiway') or railway in ('light_rail', 'subway', 'narrow_gauge', 'rail', 'spur', 'siding', 'preserved', 'funicular', 'tram', 'monorail', 'platform', 'miniature', 'turntable', 'disused', 'abandoned', 'construction')) and (tunnel is null or not tunnel in ('yes','true','1')) and (bridge is null or not bridge in ('yes','true','1','viaduct')) order by z_order) as roads", "extent": "-20037508,-19929239,20037508,19929239", "key_field": "", "geometry_field": "way", @@ -767,7 +767,7 @@ ], "Datasource": { "type": "postgis", - "table": " (select way,coalesce(('highway_' || highway), ('railway_' ||(case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text when (railway='rail' and service in ('spur','siding','yard')) then 'INT-spur-siding-yard' when railway in ('light_rail', 'narrow_gauge', 'funicular', 'rail', 'subway', 'tram', 'spur', 'siding', 'monorail', 'platform', 'preserved', 'disused', 'abandoned', 'construction', 'miniature', 'turntable') then railway else null end)), ('aeroway_' || aeroway)) as feature, horse, foot, bicycle, tracktype, case when access in ('permissive') then 'permissive'::text when access in ('destination') then 'destination'::text when access in ('no', 'private') then 'no'::text else null end as access, construction, case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service, case when oneway in ('yes', '-1') and highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified','road','service','pedestrian','raceway','living_street','construction') then oneway else null end as oneway, case when layer is null then '0' else layer end as layernotnull from planet_osm_line where (highway in ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'road', 'unclassified', 'service', 'pedestrian', 'living_street', 'raceway', 'bridleway', 'footway', 'cycleway', 'path', 'track', 'steps', 'platform', 'proposed', 'construction') or aeroway in ('runway','taxiway') or railway in ('light_rail', 'subway', 'narrow_gauge', 'rail', 'spur', 'siding', 'preserved', 'funicular', 'tram', 'monorail', 'platform', 'miniature', 'turntable', 'disused', 'abandoned', 'construction')) and (tunnel is null or not tunnel in ('yes','true','1')) and (bridge is null or not bridge in ('yes','true','1','viaduct')) order by z_order) as roads_fill", + "table": " (select way,coalesce(('highway_' || highway), ('railway_' ||(case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text when (railway='rail' and service in ('spur','siding','yard')) then 'INT-spur-siding-yard' when railway in ('light_rail', 'narrow_gauge', 'funicular', 'rail', 'subway', 'tram', 'spur', 'siding', 'monorail', 'platform', 'preserved', 'disused', 'abandoned', 'construction', 'miniature', 'turntable') then railway else null end)), ('aeroway_' || aeroway)) as feature, horse, foot, bicycle, tracktype, case when access in ('permissive') then 'permissive'::text when access in ('destination') then 'destination'::text when access in ('no', 'private') then 'no'::text else null end as access, construction, case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service, case when oneway in ('yes', '-1') and highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified','road','service','pedestrian','raceway','living_street','construction') then oneway else 'no' end as oneway, case when layer is null then '0' else layer end as layernotnull from planet_osm_line where (highway in ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'road', 'unclassified', 'service', 'pedestrian', 'living_street', 'raceway', 'bridleway', 'footway', 'cycleway', 'path', 'track', 'steps', 'platform', 'proposed', 'construction') or aeroway in ('runway','taxiway') or railway in ('light_rail', 'subway', 'narrow_gauge', 'rail', 'spur', 'siding', 'preserved', 'funicular', 'tram', 'monorail', 'platform', 'miniature', 'turntable', 'disused', 'abandoned', 'construction')) and (tunnel is null or not tunnel in ('yes','true','1')) and (bridge is null or not bridge in ('yes','true','1','viaduct')) order by z_order) as roads_fill", "extent": "-20037508,-19929239,20037508,19929239", "key_field": "", "geometry_field": "way", @@ -882,7 +882,7 @@ ], "Datasource": { "type": "postgis", - "table": "(select way,coalesce(('highway_' || highway), ('railway_' ||(case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text when (railway='rail' and service in ('spur','siding','yard')) then 'INT-spur-siding-yard' when railway in ('light_rail', 'narrow_gauge', 'funicular', 'rail', 'subway', 'tram', 'spur', 'siding', 'monorail', 'platform', 'preserved', 'disused', 'abandoned', 'construction', 'miniature', 'turntable') then railway else null end)), ('aeroway_' || aeroway)) as feature, horse, foot, bicycle, tracktype, case when access in ('permissive') then 'permissive'::text when access in ('destination') then 'destination'::text when access in ('no', 'private') then 'no'::text else null end as access, construction, case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service, case when oneway in ('yes', '-1') and highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified','road','service','pedestrian','raceway','living_street','construction') then oneway else null end as oneway, case when layer is null then '0' else layer end as layernotnull from planet_osm_line where (highway in ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'road', 'unclassified', 'service', 'pedestrian', 'living_street', 'raceway', 'bridleway', 'footway', 'cycleway', 'path', 'track', 'steps', 'platform', 'proposed', 'construction') or aeroway in ('runway','taxiway') or railway in ('light_rail', 'subway', 'narrow_gauge', 'rail', 'spur', 'siding', 'preserved', 'funicular', 'tram', 'monorail', 'platform', 'miniature', 'turntable', 'disused', 'abandoned', 'construction')) and bridge in ('yes','true','1','viaduct') and (layer is null or (layer in ('0','1','2','3','4','5'))) order by layernotnull, z_order) as bridges", + "table": "(select way,coalesce(('highway_' || highway), ('railway_' ||(case when railway='preserved' and service in ('spur','siding','yard') then 'INT-preserved-ssy'::text when (railway='rail' and service in ('spur','siding','yard')) then 'INT-spur-siding-yard' when railway in ('light_rail', 'narrow_gauge', 'funicular', 'rail', 'subway', 'tram', 'spur', 'siding', 'monorail', 'platform', 'preserved', 'disused', 'abandoned', 'construction', 'miniature', 'turntable') then railway else null end)), ('aeroway_' || aeroway)) as feature, horse, foot, bicycle, tracktype, case when access in ('permissive') then 'permissive'::text when access in ('destination') then 'destination'::text when access in ('no', 'private') then 'no'::text else null end as access, construction, case when service in ('parking_aisle','drive-through','driveway') then 'INT-minor'::text else 'INT-normal'::text end as service, case when oneway in ('yes', '-1') and highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified','road','service','pedestrian','raceway','living_street','construction') then oneway else 'no' end as oneway, case when layer is null then '0' else layer end as layernotnull from planet_osm_line where (highway in ('motorway', 'motorway_link', 'trunk', 'trunk_link', 'primary', 'primary_link', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'road', 'unclassified', 'service', 'pedestrian', 'living_street', 'raceway', 'bridleway', 'footway', 'cycleway', 'path', 'track', 'steps', 'platform', 'proposed', 'construction') or aeroway in ('runway','taxiway') or railway in ('light_rail', 'subway', 'narrow_gauge', 'rail', 'spur', 'siding', 'preserved', 'funicular', 'tram', 'monorail', 'platform', 'miniature', 'turntable', 'disused', 'abandoned', 'construction')) and bridge in ('yes','true','1','viaduct') and (layer is null or (layer in ('0','1','2','3','4','5'))) order by layernotnull, z_order) as bridges", "extent": "-20037508,-19929239,20037508,19929239", "key_field": "", "geometry_field": "way", diff --git a/roads.mss b/roads.mss index 19a9f62716..4d6c19e4cf 100644 --- a/roads.mss +++ b/roads.mss @@ -60,41 +60,39 @@ @residential-tunnel-fill: lighten(@residential-fill, 10%); @living-street-tunnel-fill: lighten(@living-street-fill, 10%); -@motorway-width-z12: 3; +@motorway-width-z12: 3; @motorway-oneway-width-z12: 3; @motorway-link-width-z12: 1.5; -@trunk-width-z12: 3.5; -@primary-width-z12: 3.5; -@secondary-width-z12: 3; +@trunk-width-z12: 3.5; @trunk-oneway-width-z12: 3.5; +@primary-width-z12: 3.5; @primary-oneway-width-z12: 3.5; +@secondary-width-z12: 3; @secondary-oneway-width-z12: 3; -@motorway-width-z13: 6.5; +@motorway-width-z13: 8.5; @motorway-oneway-width-z13: 6.5; @motorway-link-width-z13: 4.5; -@trunk-width-z13: 8.5; -@primary-width-z13: 8.5; -@secondary-width-z13: 9.5; -@tertiary-width-z13: 6; +@trunk-width-z13: 8.5; @trunk-oneway-width-z13: 6.5; +@primary-width-z13: 8.5; @primary-oneway-width-z13: 6.5; +@secondary-width-z13: 8.5; @secondary-oneway-width-z13: 6.5; +@tertiary-width-z13: 6; @tertiary-oneway-width-z13: 6; @residential-width-z13: 3; -@tertiary-width-z14: 7.5; +@tertiary-width-z14: 7.5; @tertiary-oneway-width-z14: 7.5; @residential-width-z14: 4.5; -@motorway-width-z15: 10.3; +@motorway-width-z15: 12.8; @motorway-oneway-width-z15: 10.3; @motorway-link-width-z15: 7.8; -@trunk-width-z15: 12.8; -@primary-width-z15: 12.8; -@secondary-width-z15: 12.8; -@tertiary-width-z15: 11.2; -@tertiary-link-width-z15: 11; +@trunk-width-z15: 12.8; @trunk-oneway-width-z15: 10.3; +@primary-width-z15: 12.8; @primary-oneway-width-z15: 10.3; +@secondary-width-z15: 12.8; @secondary-oneway-width-z15: 10.3; +@tertiary-width-z15: 11.2; @tertiary-oneway-width-z15: 9; @residential-width-z15: 8.3; @residential-width-z16: 11.2; -@motorway-width-z17: 13.5; // shouldn't be narrower than trunk! +@motorway-width-z17: 18; @motorway-oneway-width-z17: 13.5; @motorway-link-width-z17: 11.5; -@trunk-width-z17: 18; -@primary-width-z17: 18; -@secondary-width-z17: 18; -@tertiary-width-z17: 15.5; -@tertiary-link-width-z17: 16; +@trunk-width-z17: 18; @trunk-oneway-width-z17: 13.5; +@primary-width-z17: 18; @primary-oneway-width-z17: 13.5; +@secondary-width-z17: 18; @secondary-oneway-width-z17: 13.5; +@tertiary-width-z17: 15.5; @tertiary-oneway-width-z17: 12; @residential-width-z17: 15.5; @casing-width-z12: 0.5; @@ -102,10 +100,8 @@ @residential-casing-width-z13: 0.5; @casing-width-z14: 0.75; @casing-width-z15: 0.9; -@tertiary-link-casing-width-z15: 0.8; @casing-width-z16: 0.9; @casing-width-z17: 1.25; -@tertiary-link-casing-width-z17: 1.5; @bridge-casing-width-z12: 0.5; @bridge-casing-width-z13: 0.5; @@ -217,8 +213,8 @@ line-color: @tertiary-casing; line-width: @tertiary-width-z13; [zoom >= 14] { line-width: @tertiary-width-z14; } - [zoom >= 15] { line-width: @tertiary-link-width-z15; } - [zoom >= 17] { line-width: @tertiary-link-width-z17; } + [zoom >= 15] { line-width: @tertiary-width-z15; } + [zoom >= 17] { line-width: @tertiary-width-z17; } .roads-casing { line-cap: round; line-join: round; @@ -243,10 +239,15 @@ [zoom >= 13] { line-width: @motorway-width-z13; } [zoom >= 15] { line-width: @motorway-width-z15; } [zoom >= 17] { line-width: @motorway-width-z17; } + [oneway != 'no'] { + line-width: @motorway-oneway-width-z12; + [zoom >= 13] { line-width: @motorway-oneway-width-z13; } + [zoom >= 15] { line-width: @motorway-oneway-width-z15; } + [zoom >= 17] { line-width: @motorway-oneway-width-z17; } + } line-color: @motorway-casing; .roads-casing { line-join: round; - line-cap: round; } .tunnels-casing { line-dasharray: 4,2; @@ -265,9 +266,14 @@ [zoom >= 13] { line-width: @trunk-width-z13; } [zoom >= 15] { line-width: @trunk-width-z15; } [zoom >= 17] { line-width: @trunk-width-z17; } + [oneway != 'no'] { + line-width: @trunk-oneway-width-z12; + [zoom >= 13] { line-width: @trunk-oneway-width-z13; } + [zoom >= 15] { line-width: @trunk-oneway-width-z15; } + [zoom >= 17] { line-width: @trunk-oneway-width-z17; } + } .roads-casing { line-join: round; - line-cap: round; } .tunnels-casing { line-dasharray: 4,2; @@ -286,6 +292,12 @@ [zoom >= 13] { line-width: @primary-width-z13; } [zoom >= 15] { line-width: @primary-width-z15; } [zoom >= 17] { line-width: @primary-width-z17; } + [oneway != 'no'] { + line-width: @primary-oneway-width-z12; + [zoom >= 13] { line-width: @primary-oneway-width-z13; } + [zoom >= 15] { line-width: @primary-oneway-width-z15; } + [zoom >= 17] { line-width: @primary-oneway-width-z17; } + } .roads-casing { line-join: round; } @@ -306,9 +318,14 @@ [zoom >= 13] { line-width: @secondary-width-z13; } [zoom >= 15] { line-width: @secondary-width-z15; } [zoom >= 17] { line-width: @secondary-width-z17; } + [oneway != 'no'] { + line-width: @secondary-oneway-width-z12; + [zoom >= 13] { line-width: @secondary-oneway-width-z13; } + [zoom >= 15] { line-width: @secondary-oneway-width-z15; } + [zoom >= 17] { line-width: @secondary-oneway-width-z17; } + } .roads-casing { line-join: round; - line-cap: round; } .tunnels-casing { line-dasharray: 4,2; @@ -329,9 +346,14 @@ [zoom >= 14] { line-width: @tertiary-width-z14; } [zoom >= 15] { line-width: @tertiary-width-z15; } [zoom >= 17] { line-width: @tertiary-width-z17; } + [oneway != 'no'] { + line-width: @tertiary-oneway-width-z13; + [zoom >= 14] { line-width: @tertiary-oneway-width-z14; } + [zoom >= 15] { line-width: @tertiary-oneway-width-z15; } + [zoom >= 17] { line-width: @tertiary-oneway-width-z17; } + } .roads-casing { line-join: round; - line-cap: round; } .tunnels-casing { line-dasharray: 4,2; @@ -824,8 +846,8 @@ [zoom >= 13] { line-width: @tertiary-width-z13 - 2 * @casing-width-z13; [zoom >= 14] { line-width: @tertiary-width-z14 - 2 * @casing-width-z14; } - [zoom >= 15] { line-width: @tertiary-link-width-z15 - 2 * @tertiary-link-casing-width-z15; } - [zoom >= 17] { line-width: @tertiary-link-width-z17 - 2 * @tertiary-link-casing-width-z17; } + [zoom >= 15] { line-width: @tertiary-width-z15 - 2 * @casing-width-z15; } + [zoom >= 17] { line-width: @tertiary-width-z17 - 2 * @casing-width-z17; } .roads-fill, .bridges-fill { line-color: @tertiary-fill; } @@ -835,8 +857,8 @@ .bridges-fill { line-width: @tertiary-width-z13 - 2 * @bridge-casing-width-z13; [zoom >= 14] { line-width: @tertiary-width-z14 - 2 * @bridge-casing-width-z14; } - [zoom >= 15] { line-width: @tertiary-link-width-z15 - 2 * @bridge-casing-width-z15; } - [zoom >= 17] { line-width: @tertiary-link-width-z17 - 2 * @bridge-casing-width-z17; } + [zoom >= 15] { line-width: @tertiary-width-z15 - 2 * @bridge-casing-width-z15; } + [zoom >= 17] { line-width: @tertiary-width-z17 - 2 * @bridge-casing-width-z17; } } line-cap: round; line-join: round; @@ -933,23 +955,36 @@ [feature = 'highway_motorway'] { [zoom >= 12] { - line-width: @motorway-link-width-z12 - 2 * @casing-width-z12; + line-width: @motorway-width-z12 - 2 * @casing-width-z12; [zoom >= 13] { line-width: @motorway-width-z13 - 2 * @casing-width-z13; } [zoom >= 15] { line-width: @motorway-width-z15 - 2 * @casing-width-z15; } [zoom >= 17] { line-width: @motorway-width-z17 - 2 * @casing-width-z17; } + [oneway != 'no'] { + line-width: @motorway-oneway-width-z12 - 2 * @casing-width-z12; + [zoom >= 13] { line-width: @motorway-oneway-width-z13 - 2 * @casing-width-z13; } + [zoom >= 15] { line-width: @motorway-oneway-width-z15 - 2 * @casing-width-z15; } + [zoom >= 17] { line-width: @motorway-oneway-width-z17 - 2 * @casing-width-z17; } + } .roads-fill, .bridges-fill { line-color: @motorway-fill; } .tunnels-fill { line-color: @motorway-tunnel-fill; + line-cap: round; } .bridges-fill { line-width: @motorway-width-z12 - 2 * @bridge-casing-width-z12; [zoom >= 13] { line-width: @motorway-width-z13 - 2 * @bridge-casing-width-z13; } [zoom >= 15] { line-width: @motorway-width-z15 - 2 * @bridge-casing-width-z15; } [zoom >= 17] { line-width: @motorway-width-z17 - 2 * @bridge-casing-width-z17; } + [oneway != 'no'] { + line-width: @motorway-oneway-width-z12 - 2 * @bridge-casing-width-z12; + [zoom >= 13] { line-width: @motorway-oneway-width-z13 - 2 * @bridge-casing-width-z13; } + [zoom >= 15] { line-width: @motorway-oneway-width-z15 - 2 * @bridge-casing-width-z15; } + [zoom >= 17] { line-width: @motorway-oneway-width-z17 - 2 * @bridge-casing-width-z17; } + } + line-cap: round; } - line-cap: round; line-join: round; } } @@ -960,6 +995,12 @@ [zoom >= 13] { line-width: @trunk-width-z13 - 2 * @casing-width-z13; } [zoom >= 15] { line-width: @trunk-width-z15 - 2 * @casing-width-z15; } [zoom >= 17] { line-width: @trunk-width-z17 - 2 * @casing-width-z17; } + [oneway != 'no'] { + line-width: @trunk-oneway-width-z12 - 2 * @casing-width-z12; + [zoom >= 13] { line-width: @trunk-oneway-width-z13 - 2 * @casing-width-z13; } + [zoom >= 15] { line-width: @trunk-oneway-width-z15 - 2 * @casing-width-z15; } + [zoom >= 17] { line-width: @trunk-oneway-width-z17 - 2 * @casing-width-z17; } + } .roads-fill, .bridges-fill { line-color: @trunk-fill; } @@ -971,14 +1012,21 @@ [zoom >= 13] { line-width: 7; } [zoom >= 15] { line-width: 9.5; } [zoom >= 17] { line-width: 14.5; } + line-cap: round; } .tunnels-fill { line-width: @trunk-width-z12 - 2 * @bridge-casing-width-z12; [zoom >= 13] { line-width: @trunk-width-z13 - 2 * @bridge-casing-width-z13; } [zoom >= 15] { line-width: @trunk-width-z15 - 2 * @bridge-casing-width-z15; } [zoom >= 17] { line-width: @trunk-width-z17 - 2 * @bridge-casing-width-z17; } + line-cap: round; + [oneway != 'no'] { + line-width: @trunk-oneway-width-z12 - 2 * @bridge-casing-width-z12; + [zoom >= 13] { line-width: @trunk-oneway-width-z13 - 2 * @bridge-casing-width-z13; } + [zoom >= 15] { line-width: @trunk-oneway-width-z15 - 2 * @bridge-casing-width-z15; } + [zoom >= 17] { line-width: @trunk-oneway-width-z17 - 2 * @bridge-casing-width-z17; } + } } - line-cap: round; line-join: round; } } @@ -989,19 +1037,32 @@ [zoom >= 13] { line-width: @primary-width-z13 - 2 * @casing-width-z13; } [zoom >= 15] { line-width: @primary-width-z15 - 2 * @casing-width-z15; } [zoom >= 17] { line-width: @primary-width-z17 - 2 * @casing-width-z17; } + [oneway != 'no'] { + line-width: @primary-oneway-width-z12 - 2 * @casing-width-z12; + [zoom >= 13] { line-width: @primary-oneway-width-z13 - 2 * @casing-width-z13; } + [zoom >= 15] { line-width: @primary-oneway-width-z15 - 2 * @casing-width-z15; } + [zoom >= 17] { line-width: @primary-oneway-width-z17 - 2 * @casing-width-z17; } + } .roads-fill, .bridges-fill { line-color: @primary-fill; } .tunnels-fill { line-color: @primary-tunnel-fill; + line-cap: round; } .bridges-fill { line-width: @primary-width-z12 - 2 * @bridge-casing-width-z12; [zoom >= 13] { line-width: @primary-width-z13 - 2 * @bridge-casing-width-z13; } [zoom >= 15] { line-width: @primary-width-z15 - 2 * @bridge-casing-width-z15; } [zoom >= 17] { line-width: @primary-width-z17 - 2 * @bridge-casing-width-z17; } + line-cap: round; + [oneway != 'no'] { + line-width: @primary-oneway-width-z12 - 2 * @bridge-casing-width-z12; + [zoom >= 13] { line-width: @primary-oneway-width-z13 - 2 * @bridge-casing-width-z13; } + [zoom >= 15] { line-width: @primary-oneway-width-z15 - 2 * @bridge-casing-width-z15; } + [zoom >= 17] { line-width: @primary-oneway-width-z17 - 2 * @bridge-casing-width-z17; } + } } - line-cap: round; line-join: round; } } @@ -1012,19 +1073,32 @@ [zoom >= 13] { line-width: @secondary-width-z13 - 2 * @casing-width-z13; } [zoom >= 15] { line-width: @secondary-width-z15 - 2 * @casing-width-z15; } [zoom >= 17] { line-width: @secondary-width-z17 - 2 * @casing-width-z17; } + [oneway != 'no'] { + line-width: @motorway-oneway-width-z12 - 2 * @casing-width-z12; + [zoom >= 13] { line-width: @motorway-oneway-width-z13 - 2 * @casing-width-z13; } + [zoom >= 15] { line-width: @motorway-oneway-width-z15 - 2 * @casing-width-z15; } + [zoom >= 17] { line-width: @motorway-oneway-width-z17 - 2 * @casing-width-z17; } + } .roads-fill, .bridges-fill { line-color: @secondary-fill; } .tunnels-fill { line-color: @secondary-tunnel-fill; + line-cap: round; } .bridges-fill { line-width: @secondary-width-z12 - 2 * @bridge-casing-width-z12; [zoom >= 13] { line-width: @secondary-width-z13 - 2 * @bridge-casing-width-z13; } [zoom >= 15] { line-width: @secondary-width-z15 - 2 * @bridge-casing-width-z15; } [zoom >= 17] { line-width: @secondary-width-z17 - 2 * @bridge-casing-width-z17; } + [oneway != 'no'] { + line-width: @secondary-oneway-width-z12 - 2 * @bridge-casing-width-z12; + [zoom >= 13] { line-width: @secondary-oneway-width-z13 - 2 * @bridge-casing-width-z13; } + [zoom >= 15] { line-width: @secondary-oneway-width-z15 - 2 * @bridge-casing-width-z15; } + [zoom >= 17] { line-width: @secondary-oneway-width-z17 - 2 * @bridge-casing-width-z17; } + } + line-cap: round; } - line-cap: round; line-join: round; } } @@ -1035,19 +1109,32 @@ [zoom >= 14] { line-width: @tertiary-width-z14 - 2 * @casing-width-z14; } [zoom >= 15] { line-width: @tertiary-width-z15 - 2 * @casing-width-z15; } [zoom >= 17] { line-width: @tertiary-width-z17 - 2 * @casing-width-z17; } + [oneway != 'no'] { + line-width: @tertiary-oneway-width-z13 - 2 * @casing-width-z13; + [zoom >= 14] { line-width: @tertiary-oneway-width-z14 - 2 * @casing-width-z14; } + [zoom >= 15] { line-width: @tertiary-oneway-width-z15 - 2 * @casing-width-z15; } + [zoom >= 17] { line-width: @tertiary-oneway-width-z17 - 2 * @casing-width-z17; } + } .roads-fill, .bridges-fill { line-color: @tertiary-fill; } .tunnels-fill { line-color: @tertiary-tunnel-fill; + line-cap: round; } .bridges-fill { line-width: @tertiary-width-z13 - 2 * @bridge-casing-width-z13; [zoom >= 14] { line-width: @tertiary-width-z14 - 2 * @bridge-casing-width-z14; } [zoom >= 15] { line-width: @tertiary-width-z15 - 2 * @bridge-casing-width-z15; } [zoom >= 17] { line-width: @tertiary-width-z17 - 2 * @bridge-casing-width-z17; } + [oneway != 'no'] { + line-width: @tertiary-oneway-width-z13 - 2 * @bridge-casing-width-z13; + [zoom >= 14] { line-width: @tertiary-oneway-width-z14 - 2 * @bridge-casing-width-z14; } + [zoom >= 15] { line-width: @tertiary-oneway-width-z15 - 2 * @bridge-casing-width-z15; } + [zoom >= 17] { line-width: @tertiary-oneway-width-z17 - 2 * @bridge-casing-width-z17; } + } + line-cap: round; } - line-cap: round; line-join: round; } }