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

Remove polygon fill rendering for barrier=hedge #3844

Merged
merged 3 commits into from
Jan 24, 2020
Merged
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
13 changes: 1 addition & 12 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -845,18 +845,7 @@
}
}

#area-barriers {
[zoom >= 16] {
line-color: #444;
line-width: 0.4;
[feature = 'barrier_hedge'] {
polygon-fill: #aed1a0;
}
}
}

#line-barriers,
#area-barriers {
#barriers {
[zoom >= 16] {
line-width: 0.4;
line-color: #444;
Expand Down
52 changes: 24 additions & 28 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -573,20 +573,37 @@ Layer:
) AS tourism_boundary
properties:
minzoom: 10
- id: line-barriers
- id: barriers
geometry: linestring
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way, COALESCE(historic, barrier) AS feature
FROM (SELECT way,
('barrier_' || (CASE WHEN barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail',
'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall') THEN barrier ELSE NULL END)) AS barrier,
('historic_' || (CASE WHEN historic = 'citywalls' THEN historic ELSE NULL END)) AS historic
FROM planet_osm_line
WHERE barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail',
FROM
(SELECT way,
('barrier_' || (CASE WHEN barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail',
'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall') THEN barrier ELSE NULL END)) AS barrier,
('historic_' || (CASE WHEN historic = 'citywalls' THEN historic ELSE NULL END)) AS historic
FROM
(SELECT
way,
historic,
barrier,
waterway
FROM planet_osm_polygon
WHERE way && !bbox!
UNION ALL
SELECT
way,
historic,
barrier,
waterway
FROM planet_osm_line
WHERE way && !bbox!
) _
WHERE barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail',
'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall')
OR historic = 'citywalls'
AND (waterway IS NULL OR waterway NOT IN ('river', 'canal', 'stream', 'drain', 'ditch'))
Expand All @@ -608,27 +625,6 @@ Layer:
properties:
cache-features: true
minzoom: 13
- id: area-barriers
geometry: polygon
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way, COALESCE(historic, barrier) AS feature
FROM (SELECT way,
('barrier_' || (CASE WHEN barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail',
'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall') THEN barrier ELSE NULL END)) AS barrier,
('historic_' || (CASE WHEN historic = 'citywalls' THEN historic ELSE NULL END)) AS historic
FROM planet_osm_polygon
WHERE (barrier IN ('chain', 'city_wall', 'embankment', 'ditch', 'fence', 'guard_rail',
'handrail', 'hedge', 'kerb', 'retaining_wall', 'wall')
OR historic = 'citywalls')
AND building IS NULL
) AS features
) AS area_barriers
properties:
minzoom: 16
- id: ferry-routes
geometry: linestring
<<: *extents
Expand Down