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

Buildings code rewrite #3426

Merged
merged 13 commits into from
Oct 19, 2018
19 changes: 5 additions & 14 deletions buildings.mss
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,20 @@
[zoom >= 13] {
polygon-fill: @building-low-zoom;
polygon-clip: false;
line-width: 0;
[zoom >= 15] {
line-color: @building-line;
polygon-fill: @building-fill;
line-color: @building-line;
line-width: .75;
line-clip: false;
}
}
}

#buildings-major {
[zoom >= 13] {
[aeroway = 'terminal'],
[amenity = 'place_of_worship'],
[building = 'train_station'],
[aeroway = 'terminal'],
[aerialway = 'station'],
[building = 'train_station'],
[public_transport = 'station'] {
polygon-fill: @building-major-fill;
polygon-clip: false;
[zoom >= 15] {
line-width: .75;
line-clip: false;
line-color: @building-major-line;
}
line-color: @building-major-line;
}
}
}
Expand Down
31 changes: 2 additions & 29 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -418,28 +418,6 @@ Layer:
properties:
minzoom: 12
- id: buildings
geometry: polygon
<<: *extents
Datasource:
<<: *osm2pgsql
table: |-
(SELECT
way,
building
FROM planet_osm_polygon
WHERE building IS NOT NULL
AND building != 'no'
AND (aeroway IS NULL OR aeroway != 'terminal')
AND (amenity IS NULL OR amenity != 'place_of_worship')
AND building != 'train_station'
AND (aerialway IS NULL OR aerialway != 'station')
AND ((tags->'public_transport') IS NULL OR tags->'public_transport' != 'station')
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
ORDER BY COALESCE(layer,0), way_area DESC
) AS buildings
properties:
minzoom: 13
- id: buildings-major
geometry: polygon
<<: *extents
Datasource:
Expand All @@ -455,14 +433,9 @@ Layer:
FROM planet_osm_polygon
WHERE building IS NOT NULL
AND building != 'no'
AND (aeroway = 'terminal'
OR amenity = 'place_of_worship'
OR building = 'train_station'
OR aerialway = 'station'
OR tags->'public_transport' = 'station')
AND way_area > 1*!pixel_width!::real*!pixel_height!::real
ORDER BY COALESCE(layer,0), way_area DESC)
AS buildings_major
ORDER BY COALESCE(layer,0), way_area DESC
) AS buildings
properties:
minzoom: 13
- id: tunnels
Expand Down