Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render foot/cyclepaths without regard to surface #4097

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 3 additions & 34 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ Layer:
foot,
bicycle,
tracktype,
int_surface,
access,
construction,
service,
Expand All @@ -444,11 +443,6 @@ Layer:
foot,
bicycle,
tracktype,
CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground',
'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay', 'ice', 'snow') THEN 'unpaved'
WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes',
'concrete:plates', 'paving_stones', 'metal', 'wood', 'unhewn_cobblestone') THEN 'paved'
END AS int_surface,
CASE WHEN access IN ('destination') THEN 'destination'::text
WHEN access IN ('no', 'private') THEN 'no'::text
END AS access,
Expand Down Expand Up @@ -477,7 +471,6 @@ Layer:
foot,
bicycle,
tracktype,
'null',
CASE
WHEN access IN ('destination') THEN 'destination'::text
WHEN access IN ('no', 'private') THEN 'no'::text
Expand All @@ -496,8 +489,7 @@ Layer:
z_order,
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 access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END
) AS tunnels
properties:
cache-features: true
Expand Down Expand Up @@ -676,7 +668,6 @@ Layer:
foot,
bicycle,
tracktype,
int_surface,
access,
construction,
service,
Expand All @@ -690,11 +681,6 @@ Layer:
foot,
bicycle,
tracktype,
CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground',
'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay', 'ice', 'snow') THEN 'unpaved'
WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes',
'concrete:plates', 'paving_stones', 'metal', 'wood', 'unhewn_cobblestone') THEN 'paved'
END AS int_surface,
CASE WHEN access IN ('destination') THEN 'destination'::text
WHEN access IN ('no', 'private') THEN 'no'::text
END AS access,
Expand Down Expand Up @@ -726,7 +712,6 @@ Layer:
foot,
bicycle,
tracktype,
'null',
CASE
WHEN access IN ('destination') THEN 'destination'::text
WHEN access IN ('no', 'private') THEN 'no'::text
Expand All @@ -749,7 +734,6 @@ 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,
osm_id
) AS roads_sql
properties:
Expand Down Expand Up @@ -841,14 +825,7 @@ Layer:
THEN substr(highway, 0, length(highway)-4) ELSE highway end)),
('railway_' || (CASE WHEN (railway = 'rail' AND service IN ('spur', 'siding', 'yard')) THEN 'INT-spur-siding-yard'
WHEN railway IN ('rail', 'tram', 'light_rail', 'funicular', 'narrow_gauge') THEN railway END))
) AS feature,
CASE WHEN tunnel = 'yes' OR tunnel = 'building_passage' OR covered = 'yes' THEN 'yes' ELSE 'no' END AS int_tunnel,
CASE WHEN highway IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary_link') THEN 'yes' ELSE 'no' END AS link,
CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground',
'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay', 'ice', 'snow') THEN 'unpaved'
WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes',
'concrete:plates', 'paving_stones', 'metal', 'wood', 'unhewn_cobblestone') THEN 'paved'
END AS int_surface
) AS feature
FROM planet_osm_roads
WHERE highway IS NOT NULL
OR (railway IS NOT NULL AND railway != 'preserved'
Expand Down Expand Up @@ -894,7 +871,6 @@ Layer:
foot,
bicycle,
tracktype,
int_surface,
access,
construction,
service,
Expand All @@ -908,11 +884,6 @@ Layer:
foot,
bicycle,
tracktype,
CASE WHEN surface IN ('unpaved', 'compacted', 'dirt', 'earth', 'fine_gravel', 'grass', 'grass_paver', 'gravel', 'ground',
'mud', 'pebblestone', 'salt', 'sand', 'woodchips', 'clay', 'ice', 'snow') THEN 'unpaved'
WHEN surface IN ('paved', 'asphalt', 'cobblestone', 'cobblestone:flattened', 'sett', 'concrete', 'concrete:lanes',
'concrete:plates', 'paving_stones', 'metal', 'wood', 'unhewn_cobblestone') THEN 'paved'
END AS int_surface,
CASE WHEN access IN ('destination') THEN 'destination'::text
WHEN access IN ('no', 'private') THEN 'no'::text
END AS access,
Expand Down Expand Up @@ -941,7 +912,6 @@ Layer:
foot,
bicycle,
tracktype,
'null',
CASE
WHEN access IN ('destination') THEN 'destination'::text
WHEN access IN ('no', 'private') THEN 'no'::text
Expand All @@ -960,8 +930,7 @@ Layer:
z_order,
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 access IN ('no', 'private') THEN 0 WHEN access IN ('destination') THEN 1 ELSE 2 END
) AS bridges
properties:
cache-features: true
Expand Down
122 changes: 24 additions & 98 deletions style/roads.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1874,57 +1874,20 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
line/line-join: round;
line/line-cap: round;
line/line-width: @footway-width-z14;
[zoom >= 15][int_surface = 'paved'] {
line/line-dasharray: 2,3.5;
line/line-width: @footway-width-z15;
[zoom >= 16] {
line/line-dasharray: 3,3.5;
line/line-width: @footway-width-z16;
}
[zoom >= 17] {
line/line-dasharray: 3,3;
}
[zoom >= 18] {
line/line-width: @footway-width-z18;
}
[zoom >= 19] {
line/line-width: @footway-width-z19;
}
line/line-dasharray: 2,3.5;
line/line-width: @footway-width-z15;
[zoom >= 16] {
line/line-dasharray: 3,3.5;
line/line-width: @footway-width-z16;
}
[zoom >= 15][int_surface = null] {
line/line-color: @footway-fill;
[access = 'no'] { line/line-color: @footway-fill-noaccess; }
line/line-dasharray: 1,3,2,4;
line/line-join: round;
line/line-cap: round;
line/line-width: @footway-width-z15;
[zoom >= 16] {
line/line-dasharray: 1,4,2,3;
line/line-width: @footway-width-z16;
}
[zoom >= 18] {
line/line-width: @footway-width-z18;
}
[zoom >= 19] {
line/line-width: @footway-width-z19;
}
[zoom >= 17] {
line/line-dasharray: 3,3;
}
[zoom >= 15][int_surface = 'unpaved'] {
line/line-color: @footway-fill;
[access = 'no'] { line/line-color: @footway-fill-noaccess; }
line/line-dasharray: 1,4;
line/line-join: round;
line/line-cap: round;
line/line-width: @footway-width-z15;
[zoom >= 16] {
line/line-width: @footway-width-z16;
}
[zoom >= 18] {
line/line-width: @footway-width-z18;
}
[zoom >= 19] {
line/line-width: @footway-width-z19;
}
[zoom >= 18] {
line/line-width: @footway-width-z18;
}
[zoom >= 19] {
line/line-width: @footway-width-z19;
}
}
}
Expand Down Expand Up @@ -1955,57 +1918,20 @@ tertiary is rendered from z10 and is not included in osm_planet_roads. */
line/line-join: round;
line/line-cap: round;
line/line-width: @cycleway-width-z13;
[zoom >= 15][int_surface = 'paved'] {
line/line-dasharray: 2,3.5;
line/line-width: @cycleway-width-z15;
[zoom >= 16] {
line/line-dasharray: 3,3.5;
line/line-width: @cycleway-width-z16;
}
[zoom >= 17] {
line/line-dasharray: 3,3;
}
[zoom >= 18] {
line/line-width: @cycleway-width-z18;
}
[zoom >= 19] {
line/line-width: @cycleway-width-z19;
}
line/line-dasharray: 2,3.5;
line/line-width: @cycleway-width-z15;
[zoom >= 16] {
line/line-dasharray: 3,3.5;
line/line-width: @cycleway-width-z16;
}
[zoom >= 15][int_surface = null] {
line/line-color: @cycleway-fill;
[access = 'no'] { line/line-color: @cycleway-fill-noaccess; }
line/line-dasharray: 1,3,2,4;
line/line-join: round;
line/line-cap: round;
line/line-width: @cycleway-width-z15;
[zoom >= 16] {
line/line-dasharray: 1,4,2,3;
line/line-width: @cycleway-width-z16;
}
[zoom >= 18] {
line/line-width: @cycleway-width-z18;
}
[zoom >= 19] {
line/line-width: @cycleway-width-z19;
}
[zoom >= 17] {
line/line-dasharray: 3,3;
}
[zoom >= 15][int_surface = 'unpaved'] {
line/line-color: @cycleway-fill;
[access = 'no'] { line/line-color: @cycleway-fill-noaccess; }
line/line-dasharray: 1,4;
line/line-join: round;
line/line-cap: round;
line/line-width: @cycleway-width-z15;
[zoom >= 16] {
line/line-width: @cycleway-width-z16;
}
[zoom >= 18] {
line/line-width: @cycleway-width-z18;
}
[zoom >= 19] {
line/line-width: @cycleway-width-z19;
}
[zoom >= 18] {
line/line-width: @cycleway-width-z18;
}
[zoom >= 19] {
line/line-width: @cycleway-width-z19;
}
}
}
Expand Down