From 6ac2d9c488f4b831b6b316ce93e655709862d04b Mon Sep 17 00:00:00 2001 From: meased Date: Thu, 18 Oct 2018 19:19:23 -0700 Subject: [PATCH] Buildings code rewrite (#3426) --- buildings.mss | 19 +++++-------------- project.mml | 31 ++----------------------------- 2 files changed, 7 insertions(+), 43 deletions(-) diff --git a/buildings.mss b/buildings.mss index 4d1ec0e122..0b5a365902 100644 --- a/buildings.mss +++ b/buildings.mss @@ -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; } } } diff --git a/project.mml b/project.mml index 6947d6c204..108d1d2dcf 100644 --- a/project.mml +++ b/project.mml @@ -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: @@ -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