Skip to content

Commit

Permalink
Select only specific values of barrier and historic=citywalls for are…
Browse files Browse the repository at this point in the history
…a-barriers layer (gravitystorm#3745)
  • Loading branch information
jeisenbe authored and imagico committed May 21, 2019
1 parent 728032e commit 18751e2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,16 @@ Layer:
<<: *osm2pgsql
table: |-
(SELECT
way, barrier AS feature
way, COALESCE(historic, barrier) AS feature
FROM (SELECT way,
('barrier_' || barrier) AS barrier
('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 IS NOT NULL
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:
Expand Down

0 comments on commit 18751e2

Please sign in to comment.