From 0faa8af90be39dd95bc6e03bd05a96b0c3ea5529 Mon Sep 17 00:00:00 2001 From: LaoshuBaby Date: Wed, 6 Jan 2021 22:57:56 +0800 Subject: [PATCH 1/3] add amenity=research_institute --- project.mml | 6 +++--- style/amenity-points.mss | 4 ++++ style/landcover.mss | 1 + 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/project.mml b/project.mml index 0b34b673c2..809bec84c0 100644 --- a/project.mml +++ b/project.mml @@ -91,7 +91,7 @@ Layer: FROM (SELECT way, COALESCE(name, '') AS name, ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway END)) AS aeroway, - ('amenity_' || (CASE WHEN amenity IN ('bicycle_parking', 'motorcycle_parking', 'university', 'college', 'school', 'taxi', + ('amenity_' || (CASE WHEN amenity IN ('bicycle_parking', 'motorcycle_parking', 'university', 'research_institute', 'college', 'school', 'taxi', 'hospital', 'kindergarten', 'grave_yard', 'prison', 'place_of_worship', 'clinic', 'ferry_terminal', 'marketplace', 'community_centre', 'social_facility', 'arts_centre', 'parking_space', 'bus_station', 'fire_station', 'police') @@ -119,7 +119,7 @@ Layer: WHERE (landuse IS NOT NULL OR leisure IS NOT NULL OR aeroway IN ('apron', 'aerodrome') - OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'taxi', 'university', 'college', 'school', 'hospital', 'kindergarten', + OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'taxi', 'university', 'research_institute', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship', 'prison', 'clinic', 'ferry_terminal', 'marketplace', 'community_centre', 'social_facility', 'arts_centre', 'parking_space', 'bus_station', 'fire_station', 'police') OR man_made IN ('works', 'wastewater_plant','water_works') @@ -1482,7 +1482,7 @@ Layer: 'nightclub', 'nursing_home', 'pharmacy', 'place_of_worship', 'police', 'post_box', 'post_office', 'prison', 'pub', 'public_bath', 'public_bookcase', 'recycling', 'restaurant', 'school', 'shelter', 'shower', 'social_facility', 'taxi', 'telephone', 'theatre', 'toilets', 'townhall', - 'university', 'vehicle_inspection', 'veterinary') THEN amenity END, + 'university', 'research_institute', 'vehicle_inspection', 'veterinary') THEN amenity END, 'amenity_' || CASE WHEN amenity IN ('waste_disposal') AND way_area IS NOT NULL THEN amenity END, -- Waste disposal points are rendered in the low priority layer 'amenity_' || CASE WHEN amenity IN ('vending_machine') AND tags->'vending' IN ('excrement_bags', 'parking_tickets', 'public_transport_tickets') THEN amenity END, 'diplomatic_'|| CASE WHEN tags->'office' IN ('diplomatic') AND tags->'diplomatic' IN ('embassy', 'consulate') THEN tags->'diplomatic' ELSE NULL END, diff --git a/style/amenity-points.mss b/style/amenity-points.mss index bbf3ea555c..a599e1fc12 100644 --- a/style/amenity-points.mss +++ b/style/amenity-points.mss @@ -2173,6 +2173,7 @@ [feature = 'amenity_school'], [feature = 'amenity_college'], [feature = 'amenity_university'], + [feature = 'amenity_research_institute'], [feature = 'landuse_religious'], [feature = 'natural_heath'], [feature = 'natural_scrub'], @@ -2286,6 +2287,9 @@ [feature = 'amenity_college'], [feature = 'amenity_university'] { text-fill: darken(@societal_amenities, 80%); + } + [feature = 'amenity_research_institute'] { + text-fill: darken(@societal_amenities, 80%); } [feature = 'landuse_religious'] { text-fill: darken(@place_of_worship, 50%); diff --git a/style/landcover.mss b/style/landcover.mss index e85f9c05a2..647f5e0a7f 100644 --- a/style/landcover.mss +++ b/style/landcover.mss @@ -573,6 +573,7 @@ [feature = 'amenity_hospital'], [feature = 'amenity_clinic'], [feature = 'amenity_university'], + [feature = 'amenity_research_institute'], [feature = 'amenity_college'], [feature = 'amenity_school'], [feature = 'amenity_kindergarten'], From 74e97faea24e2a8610964f3a81428fdc37358dae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=AB=E4=B9=90=E7=9A=84=E8=80=81=E9=BC=A0=E5=AE=9D?= =?UTF-8?q?=E5=AE=9D?= <42690037+LaoshuBaby@users.noreply.github.com> Date: Mon, 11 Jan 2021 14:50:56 +0800 Subject: [PATCH 2/3] Compress multi-amanity into 7 lines, maybe wrong --- style/amenity-points.mss | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/style/amenity-points.mss b/style/amenity-points.mss index a599e1fc12..0c97a44c7b 100644 --- a/style/amenity-points.mss +++ b/style/amenity-points.mss @@ -2282,15 +2282,13 @@ text-fill: @tourism; text-face-name: @bold-fonts; /*rendered bold to improve visibility since theme parks tend to have crowded backgrounds*/ } - [feature = 'amenity_kindergarten'], [feature = 'amenity_school'], - [feature = 'amenity_college'], - [feature = 'amenity_university'] { - text-fill: darken(@societal_amenities, 80%); - } - [feature = 'amenity_research_institute'] { - text-fill: darken(@societal_amenities, 80%); - } + [feature = 'amenity_kindergarten'], + [feature = 'amenity_college'], + [feature = 'amenity_university'], + [feature = 'amenity_research_institute'] { + text-fill: darken(@societal_amenities, 80%); + } [feature = 'landuse_religious'] { text-fill: darken(@place_of_worship, 50%); } From ecfda056ad597b49de1df9f68362a69e19f41558 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BF=AB=E4=B9=90=E7=9A=84=E8=80=81=E9=BC=A0=E5=AE=9D?= =?UTF-8?q?=E5=AE=9D?= <42690037+LaoshuBaby@users.noreply.github.com> Date: Mon, 11 Jan 2021 15:01:38 +0800 Subject: [PATCH 3/3] re-order univ. with inst. to make it like comment said --- style/amenity-points.mss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/style/amenity-points.mss b/style/amenity-points.mss index 0c97a44c7b..2ef1a5f488 100644 --- a/style/amenity-points.mss +++ b/style/amenity-points.mss @@ -2285,8 +2285,8 @@ [feature = 'amenity_school'], [feature = 'amenity_kindergarten'], [feature = 'amenity_college'], - [feature = 'amenity_university'], - [feature = 'amenity_research_institute'] { + [feature = 'amenity_research_institute'], + [feature = 'amenity_university'] { text-fill: darken(@societal_amenities, 80%); } [feature = 'landuse_religious'] {