diff --git a/labels.mss b/labels.mss index ec5ee4c2..f1dd3949 100644 --- a/labels.mss +++ b/labels.mss @@ -533,12 +533,14 @@ marker-max-error: 0.5; marker-spacing: 100; marker-fill: #777777; - [oneway != 'yes'][oneway_bicycle = 'yes'] { - marker-fill: #00f; - } - [highway='cycleway'] { + [highway='cycleway'], + [highway='path'] { marker-fill: #ddf; } + /* Weird case where the road is oneway for only the bicycles, blue arrow. */ + [oneway != 'yes'][oneway_bicycle = 'yes'][highway!='path'][highway!='cycleway'] { + marker-fill: #00f; + } marker-file: url(symbols/oneway.svg); [oneway='-1'] { marker-file: url(symbols/oneway-reverse.svg); @@ -549,7 +551,7 @@ } } [oneway = 'yes'][oneway_bicycle = 'no'], - [oneway='-1'][oneway_bicycle = 'no'] { + [oneway = '-1'][oneway_bicycle = 'no'] { bike/marker-placement:line; bike/marker-max-error: 0.5; bike/marker-spacing: 100; diff --git a/project.mml b/project.mml index e22c5276..200c396c 100644 --- a/project.mml +++ b/project.mml @@ -518,6 +518,18 @@ Layer: WHEN access='no' AND (bicycle IS NULL OR bicycle='no') THEN 'no' ELSE NULL END AS can_bicycle, + CASE + WHEN bicycle IN ('designated') THEN 'yes' + ELSE NULL + END AS designated, + CASE + WHEN tags->'segregated' IN ('yes') THEN 'yes' + ELSE 'no' + END AS segregated, + CASE + WHEN tags->'oneway:bicycle' IN ('yes', '-1') THEN 'yes' + ELSE 'no' + END AS oneway_bicycle, tags->'ramp:stroller' AS ramp_stroller, tags->'ramp:bicycle' AS ramp_cycle, tags->'ramp:wheelchair' AS ramp_wheelchair, @@ -627,6 +639,18 @@ Layer: WHEN access='no' AND (bicycle IS NULL OR bicycle='no') THEN 'no' ELSE NULL END AS can_bicycle, + CASE + WHEN bicycle IN ('designated') THEN 'yes' + ELSE NULL + END AS designated, + CASE + WHEN tags->'segregated' IN ('yes') THEN 'yes' + ELSE 'no' + END AS segregated, + CASE + WHEN tags->'oneway:bicycle' IN ('yes', '-1') THEN 'yes' + ELSE 'no' + END AS oneway_bicycle, tags->'ramp:stroller' AS ramp_stroller, tags->'ramp:bicycle' AS ramp_cycle, tags->'ramp:wheelchair' AS ramp_wheelchair, @@ -778,6 +802,18 @@ Layer: WHEN access='no' AND (bicycle IS NULL OR bicycle='no') THEN 'no' ELSE NULL END AS can_bicycle, + CASE + WHEN bicycle IN ('designated') THEN 'yes' + ELSE NULL + END AS designated, + CASE + WHEN tags->'segregated' IN ('yes') THEN 'yes' + ELSE 'no' + END AS segregated, + CASE + WHEN tags->'oneway:bicycle' IN ('yes', '-1') THEN 'yes' + ELSE 'no' + END AS oneway_bicycle, tags->'ramp:stroller' AS ramp_stroller, tags->'ramp:bicycle' AS ramp_cycle, tags->'ramp:wheelchair' AS ramp_wheelchair, @@ -1987,8 +2023,7 @@ Layer: ELSE 'no' END AS oneway, CASE - WHEN tags->'oneway:bicycle'='no' THEN 'no' - WHEN tags->'oneway:bicycle'='yes' THEN 'yes' + WHEN tags->'oneway:bicycle' IN ('yes', '-1') THEN 'yes' WHEN tags->'cycleway' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') OR tags->'cycleway:both' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') OR tags->'cycleway:left' IN ('opposite', 'opposite_lane', 'opposite_track', 'opposite_share_busway') @@ -2023,9 +2058,12 @@ Layer: USING (highway) WHERE 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', 'cycleway', 'path') - AND (name IS NOT NULL + AND ( + name IS NOT NULL OR oneway IN ('yes', '-1') - OR junction IN ('roundabout')) + OR tags->'oneway:bicycle' IN ('yes', '-1') + OR junction IN ('roundabout') + ) ORDER BY z_order DESC, -- put important roads first CASE WHEN layer~E'^\\d+$' THEN layer::integer ELSE 0 END, -- put top layered roads first diff --git a/road-colors-generated.mss b/road-colors-generated.mss index 36f20100..70a86a11 100644 --- a/road-colors-generated.mss +++ b/road-colors-generated.mss @@ -12,7 +12,7 @@ @icn-shield-fill: #f6f6f6; @lcn-overlay: #0000ff; @lcn-shield-fill: #f6f6f6; -@mixed-cycle-fill: #0080ff; +@mixed-cycle-fill: #0050ff; @motorway-trunk-case: #f6f6f6; @motorway-trunk-fill: #c0ccc4; @motorway-trunk-line: #f6f6f6; diff --git a/road-colors.yml b/road-colors.yml index 165a3adc..2be6ad23 100644 --- a/road-colors.yml +++ b/road-colors.yml @@ -51,7 +51,7 @@ mss: fill: '#0000ff' case: '@land' mixed-cycle: - fill: '#0080ff' + fill: '#0050ff' footway: fill: '#4f874f' steps: diff --git a/roads.mss b/roads.mss index de681648..8bba2cb7 100644 --- a/roads.mss +++ b/roads.mss @@ -632,6 +632,7 @@ come in as well. /* Eventually overload right border for cycleways */ #roads_high::outline_right[zoom>=11][has_right_cycleway=1], +#roads_high::outline_right[zoom>=17][type='path'][designated='yes'][segregated='yes'], #tunnel::outline_right[zoom>=11][has_right_cycleway=1], #bridge::outline_right[zoom>=11][has_right_cycleway=1] { /* -- colors & styles -- */ @@ -649,6 +650,9 @@ come in as well. line-dasharray: 6,10; line-cap: butt; } + [type='path'][designated='yes'][segregated='yes'] { + line-color: @path-fill; + } /* widths */ line-width: 0; @@ -777,6 +781,12 @@ come in as well. [type='service'] { line-width: @rdz17_service; line-offset: @rdz17_cycle; } [type='track'] { line-width: @rdz17_track; line-offset: @rdz17_cycle; } [type='pedestrian'] { line-width: @rdz17_pedestrian; line-offset: @rdz17_cycle; } + [type='path'] { + line-width: @rdz17_path; line-offset: @rdz17_path/2 + @rdz17_cycle/2; + [oneway='no'][oneway_bicycle='no'] { + line-width: @rdz17_path; line-offset: @rdz17_path/2 + @rdz17_cycle*1.5/2; + } + } } [zoom>=18] { [type='motorway_trunk'] { line-width: @rdz18_motorway_trunk; line-offset: @rdz18_cycle; } @@ -795,6 +805,12 @@ come in as well. [type='service'] { line-width: @rdz18_service; line-offset: @rdz18_cycle; } [type='track'] { line-width: @rdz18_track; line-offset: @rdz18_cycle; } [type='pedestrian'] { line-width: @rdz18_pedestrian; line-offset: @rdz18_cycle; } + [type='path'] { + line-width: @rdz18_path; line-offset: @rdz18_path/2 + @rdz18_cycle/2; + [oneway='no'][oneway_bicycle='no']{ + line-width: @rdz18_path; line-offset: @rdz18_path/2 + @rdz18_cycle*1.5/2; + } + } } } @@ -1005,9 +1021,7 @@ come in as well. [type='path'] { line-width: @rdz14_path + @rdz14_path_outline; } [type='steps'] { line-width: @rdz14_steps + @rdz14_steps_outline; } [type='cycleway'], - [type='path'][can_bicycle='yes'], - [type='footway'][can_bicycle='yes'], - [type='bridleway'][can_bicycle='yes'] { + [type='path'][can_bicycle='yes'] { line-width: @rdz14_cycle + @rdz14_cycle_outline; } } @@ -1018,9 +1032,7 @@ come in as well. [type='path'] { line-width: @rdz15_path + @rdz15_path_outline; } [type='steps'] { line-width: @rdz15_steps + @rdz15_steps_outline; } [type='cycleway'], - [type='path'][can_bicycle='yes'], - [type='footway'][can_bicycle='yes'], - [type='bridleway'][can_bicycle='yes'] { + [type='path'][can_bicycle='yes'] { line-width: @rdz15_cycle + @rdz15_cycle_outline; } } @@ -1031,9 +1043,7 @@ come in as well. [type='path'] { line-width: @rdz16_path + @rdz16_path_outline; } [type='steps'] { line-width: @rdz16_steps + @rdz16_steps_outline; } [type='cycleway'], - [type='path'][can_bicycle='yes'], - [type='footway'][can_bicycle='yes'], - [type='bridleway'][can_bicycle='yes'] { + [type='path'][can_bicycle='yes'] { line-width: @rdz16_cycle + @rdz16_cycle_outline; } } @@ -1044,9 +1054,7 @@ come in as well. [type='path'] { line-width: @rdz17_path + @rdz17_path_outline; } [type='steps'] { line-width: @rdz17_steps + @rdz17_steps_outline; } [type='cycleway'], - [type='path'][can_bicycle='yes'], - [type='footway'][can_bicycle='yes'], - [type='bridleway'][can_bicycle='yes'] { + [type='path'][can_bicycle='yes'] { line-width: @rdz17_cycle + @rdz17_cycle_outline; } } @@ -1057,9 +1065,7 @@ come in as well. [type='path'] { line-width: @rdz18_path + @rdz18_path_outline; } [type='steps'] { line-width: @rdz18_steps + @rdz18_steps_outline; } [type='cycleway'], - [type='path'][can_bicycle='yes'], - [type='footway'][can_bicycle='yes'], - [type='bridleway'][can_bicycle='yes'] { + [type='path'][can_bicycle='yes'] { line-width: @rdz18_cycle + @rdz18_cycle_outline; } } @@ -1131,6 +1137,12 @@ come in as well. [type='bridleway'][can_bicycle='yes'] { line-color: @path-fill; } + [type='path'][designated='yes'] { + line-color: @mixed-cycle-fill; + [segregated='yes'] { + line-color: @cycle-fill; + } + } [type='path'][can_bicycle='no'] { line-color: @path-nobicycle; } @@ -1217,14 +1229,14 @@ come in as well. [type='track'] { line-width: @rdz11_track; } [type='pedestrian'] { line-width: @rdz11_pedestrian; } // bridleway, footway, steps are not shown at Z11 - [type='path'], - [type='footway'][can_bicycle='yes'], - [type='bridleway'][can_bicycle='yes'] { + [type='path'] { line-width: @rdz11_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz11_cycle; - [oneway='no'] { line-width: @rdz11_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz11_cycle*1.5; } } } [zoom=12] { @@ -1245,14 +1257,14 @@ come in as well. [type='track'] { line-width: @rdz12_track; } [type='pedestrian'] { line-width: @rdz12_pedestrian; } // bridleway, footway, steps are not shown at Z12 - [type='path'], - [type='footway'][can_bicycle='yes'], - [type='bridleway'][can_bicycle='yes'] { + [type='path'] { line-width: @rdz12_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz12_cycle; - [oneway='no'] { line-width: @rdz12_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz12_cycle*1.5; } } } [zoom=13] { @@ -1280,9 +1292,11 @@ come in as well. line-width: @rdz13_path; } [type='steps'] { line-width: @rdz13_steps; line-dasharray: 0.5,0.5; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz13_cycle; - [oneway='no'] { line-width: @rdz13_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz13_cycle*1.5; } } } [zoom=14] { @@ -1310,9 +1324,11 @@ come in as well. line-width: @rdz14_path; } [type='steps'] { line-width: @rdz14_steps; line-dasharray: 0.5,0.5; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz14_cycle; - [oneway='no'] { line-width: @rdz14_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz14_cycle*1.5; } } } [zoom=15] { @@ -1340,9 +1356,11 @@ come in as well. line-width: @rdz15_path; } [type='steps'] { line-width: @rdz15_steps; line-dasharray: 0.5,0.5; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz15_cycle; - [oneway='no'] { line-width: @rdz15_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz15_cycle*1.5; } } } [zoom=16] { @@ -1370,9 +1388,11 @@ come in as well. line-width: @rdz16_path; } [type='steps'] { line-width: @rdz16_steps; line-dasharray: 1.5,0.75; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz16_cycle; - [oneway='no'] { line-width: @rdz16_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz16_cycle*1.5; } } } [zoom=17] { @@ -1400,9 +1420,11 @@ come in as well. line-width: @rdz17_path; } [type='steps'] { line-width: @rdz17_steps; line-dasharray: 2,1; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz17_cycle; - [oneway='no'] { line-width: @rdz17_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz17_cycle*1.5; } } } [zoom>=18] { @@ -1424,15 +1446,15 @@ come in as well. [type='pedestrian'] { line-width: @rdz18_pedestrian; } [type='bridleway'] { line-width: @rdz18_bridleway; /*line-dasharray: 3,3;*/ } [type='footway'] { line-width: @rdz18_footway; } - [type='path'], - [type='footway'][can_bicycle='yes'], - [type='bridleway'][can_bicycle='yes'] { + [type='path'] { line-width: @rdz18_path; } [type='steps'] { line-width: @rdz18_steps; line-dasharray: 2,1; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz18_cycle; - [oneway='no'] { line-width: @rdz18_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz18_cycle*1.5; } } } } @@ -1477,9 +1499,6 @@ come in as well. [type='track'] { line-color: @track-light1; } - [type='cycleway'] { - line-color: lighten(@cycle-fill, @surfaceLighter1); - } [type='bridleway'] { line-color: lighten(@bridleway-fill, @surfaceLighter1); } @@ -1494,6 +1513,15 @@ come in as well. [type='path'][can_bicycle='no'] { line-color: lighten(@path-nobicycle,@surfaceLighter1); } + [type='cycleway'] { + line-color: lighten(@cycle-fill, @surfaceLighter1); + } + [type='path'][designated='yes'] { + line-color: lighten(@mixed-cycle-fill, @surfaceLighter1); + [segregated='yes'] { + line-color: lighten(@cycle-fill, @surfaceLighter1); + } + } [zoom>=15] { [type='primary'] { line-width: @rdz15_primary; } @@ -1516,9 +1544,11 @@ come in as well. [type='bridleway'][can_bicycle='yes'] { line-width: @rdz15_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz15_cycle; - [oneway='no'] { line-width: @rdz15_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz15_cycle*1.5; } } } [zoom>=16] { @@ -1542,9 +1572,11 @@ come in as well. [type='bridleway'][can_bicycle='yes'] { line-width: @rdz16_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz16_cycle; - [oneway='no'] { line-width: @rdz16_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz16_cycle*1.5; } } } [zoom>=17] { @@ -1568,9 +1600,11 @@ come in as well. [type='bridleway'][can_bicycle='yes'] { line-width: @rdz17_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz17_cycle; - [oneway='no'] { line-width: @rdz17_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz17_cycle*1.5; } } } [zoom>=18] { @@ -1594,9 +1628,11 @@ come in as well. [type='bridleway'][can_bicycle='yes'] { line-width: @rdz18_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'] { line-width: @rdz18_cycle; - [oneway='no'] { line-width: @rdz18_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz18_cycle*1.5; } } } } @@ -1658,9 +1694,13 @@ come in as well. [type='bridleway'][can_bicycle='yes'] { line-width: @rdz15_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'], + [type='footway'][designated='yes'], + [type='bridleway'][designated='yes'] { line-width: @rdz15_cycle; - [oneway='no'] { line-width: @rdz15_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz15_cycle*1.5; } } } [zoom>=16] { @@ -1684,9 +1724,13 @@ come in as well. [type='bridleway'][can_bicycle='yes'] { line-width: @rdz16_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'], + [type='footway'][designated='yes'], + [type='bridleway'][designated='yes'] { line-width: @rdz16_cycle; - [oneway='no'] { line-width: @rdz16_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz16_cycle*1.5; } } } [zoom>=17] { @@ -1710,9 +1754,13 @@ come in as well. [type='bridleway'][can_bicycle='yes'] { line-width: @rdz17_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'], + [type='footway'][designated='yes'], + [type='bridleway'][designated='yes'] { line-width: @rdz17_cycle; - [oneway='no'] { line-width: @rdz17_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz17_cycle*1.5; } } } [zoom>=18] { @@ -1736,9 +1784,13 @@ come in as well. [type='bridleway'][can_bicycle='yes'] { line-width: @rdz18_path; } - [type='cycleway'] { + [type='cycleway'], + [type='path'][designated='yes'], + [type='footway'][designated='yes'], + [type='bridleway'][designated='yes'] { line-width: @rdz18_cycle; - [oneway='no'] { line-width: @rdz18_cycle*1.5; } + [oneway='no'][oneway_bicycle='no'] + { line-width: @rdz18_cycle*1.5; } } } }