Skip to content

Commit

Permalink
Render motorways where cycling is allowed in pale red. Fix #203.
Browse files Browse the repository at this point in the history
  • Loading branch information
Phyks committed Dec 1, 2019
1 parent dcb5f8a commit 3008268
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fix forest tree icons being rendered on top of buildings. See #223.
* Render `aerialway`. See #256.
* Drop road shields and place the ref of the roads along them. Fix #197.
* Render motorways where cycling is allowed in very pale red. Fix #203.

## v0.3.1

Expand Down
13 changes: 9 additions & 4 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ Layer:
END AS cycleway_right_oneway,
CASE
WHEN bicycle IS NOT NULL THEN bicycle
WHEN access IS NOT NULL THEN access
WHEN highway NOT IN ('motorway', 'motorway_link') AND access IS NOT NULL THEN access
ELSE NULL
END AS can_bicycle,
CASE
Expand Down Expand Up @@ -722,7 +722,8 @@ Layer:
CASE
WHEN highway IN ('motorway', 'trunk') THEN 'motorway_trunk'
ELSE highway
END AS type
END AS type,
bicycle
FROM planet_osm_roads
WHERE highway IN ('motorway', 'trunk', 'primary', 'secondary', 'motorway_link', 'trunk_link')
) AS data
Expand All @@ -736,8 +737,12 @@ Layer:
<<: *osm2pgsql
table: |-
(
SELECT ST_Snaptogrid(way, !pixel_width! / 4) AS way,
'motorway_trunk' AS type, bridge, tunnel
SELECT
ST_Snaptogrid(way, !pixel_width! / 4) AS way,
'motorway_trunk' AS type,
bridge,
tunnel,
bicycle
FROM planet_osm_roads
WHERE highway IN ('motorway', 'trunk')
) AS data
Expand Down
7 changes: 1 addition & 6 deletions road-colors-generated.mss
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
@lcn-shield-fill: #f6f6f6;
@mixed-cycle-fill: #0050ff;
@motorway-trunk-case: #f6f6f6;
@motorway-trunk-cycle-fill: #f4c3c3;
@motorway-trunk-fill: #c0ccc4;
@motorway-trunk-line: #f6f6f6;
@motorway-trunk-shield-fill: #620728;
@mtb-overlay: #d15000;
@mtb-shield-fill: #f6f6f6;
@ncn-overlay: #aa00ff;
Expand All @@ -27,27 +27,22 @@
@primary-case: #d8b267;
@primary-fill: #f4dfc3;
@primary-line: #f4dfc3;
@primary-shield-fill: #4c2e00;
@rail-line: #999999;
@rcn-overlay: #5500ff;
@rcn-shield-fill: #f6f6f6;
@secondary-case: #b1bb5d;
@secondary-fill: #f6f8d2;
@secondary-line: #f6f8d2;
@secondary-shield-fill: #323b00;
@speed20-fill: #21ffcc;
@speed32-fill: #bbffff;
@speedWalk-fill: #41ffa0;
@standard-case: #999;
@standard-fill: #f6f6f6;
@standard-line: #f6f6f6;
@standard-nobicycle: #c0ccc4;
@steps-case: @land;
@steps-fill: #003e00;
@tertiary-case: #777;
@tertiary-fill: #f6f6f6;
@tertiary-line: #f6f6f6;
@tertiary-shield-fill: #3b3b3b;
@track-case: #cdae8c;
@track-fill: #1e4374;
@track-light1: lighten(@track-fill, 30%);
Expand Down
6 changes: 2 additions & 4 deletions road-colors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,20 @@ mss:
line: '#f6f6f6'
fill: '#c0ccc4'
case: '#f6f6f6'
shield-fill: '#620728'
motorway-trunk-cycle:
fill: '#f4c3c3'
primary:
line: '#f4dfc3'
fill: '#f4dfc3'
case: '#d8b267'
shield-fill: '#4c2e00'
secondary:
line: '#f6f8d2'
fill: '#f6f8d2'
case: '#b1bb5d'
shield-fill: '#323b00'
tertiary:
line: '#f6f6f6'
fill: '#f6f6f6'
case: '#777'
shield-fill: '#3b3b3b'
standard:
line: '#f6f6f6'
fill: '#f6f6f6'
Expand Down
9 changes: 9 additions & 0 deletions roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and trunks. */

#roads_low[zoom>=5][zoom<=8] {
line-color: @motorway-trunk-line;
[bicycle='yes'] {
line-color: @motorway-trunk-cycle-fill;
}

[zoom >= 5] {
line-width: 0.4;
Expand All @@ -30,6 +33,9 @@ as well. */
[type='motorway_link'],
[type='trunk_link'] {
line-color: @motorway-trunk-line;
[bicycle='yes'] {
line-color: @motorway-trunk-cycle-fill;
}
}
[type='primary'] { line-color: @primary-line; }
[type='secondary'] { line-color: @secondary-line; }
Expand Down Expand Up @@ -1364,6 +1370,9 @@ come in as well.
[type='motorway_link'],
[type='trunk_link'] {
line-color: @motorway-trunk-fill;
[can_bicycle='yes'] {
line-color: @motorway-trunk-cycle-fill;
}
}
[type='primary'],
[type='primary_link'] {
Expand Down

0 comments on commit 3008268

Please sign in to comment.