From 8b67da9408db659616d385484fc54f3008875767 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Sat, 10 Feb 2018 01:09:58 +0000 Subject: [PATCH 1/8] Render offices as dots + names --- amenity-points.mss | 99 ++++++++++++++++++++++++++++++++++++++++++++++ project.mml | 28 +++++++++++++ 2 files changed, 127 insertions(+) diff --git a/amenity-points.mss b/amenity-points.mss index eaf8172bb3..fef97f1fe3 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -13,6 +13,7 @@ @memorials: @amenity-brown; @culture: @amenity-brown; @public-service: @amenity-brown; +@office: @amenity-brown; @man-made-icon: #555; @landform-color: #d08f55; @leisure-green: darken(@park, 60%); @@ -873,6 +874,52 @@ } } + [feature = 'office_accountant'], + [feature = 'office_adoption_agency'], + [feature = 'office_advertising_agency'], + [feature = 'office_architect'], + [feature = 'office_association'], + [feature = 'office_charity'], + [feature = 'office_company'], + [feature = 'office_educational_institution'], + [feature = 'office_employment_agency'], + [feature = 'office_energy_supplier'], + [feature = 'office_estate_agent'], + [feature = 'office_forestry'], + [feature = 'office_foundation'], + [feature = 'office_government'], + [feature = 'office_guide'], + [feature = 'office_insurance'], + [feature = 'office_it'], + [feature = 'office_lawyer'], + [feature = 'office_logistics'], + [feature = 'office_moving_company'], + [feature = 'office_newspaper'], + [feature = 'office_ngo'], + [feature = 'office_notary'], + [feature = 'office_political_party'], + [feature = 'office_private_investigator'], + [feature = 'office_property_management'], + [feature = 'office_quango'], + [feature = 'office_religion'], + [feature = 'office_research'], + [feature = 'office_surveyor'], + [feature = 'office_tax'], + [feature = 'office_tax_advisor'], + [feature = 'office_telecommunication'], + [feature = 'office_therapist'], + [feature = 'office_travel_agent'], + [feature = 'office_water_utility'], + [feature = 'office_real_estate_agent'] { + [zoom >= 17] { + marker-width: 4; + marker-line-width: 0; + marker-placement: interior; + marker-clip: false; + marker-fill: @office; + } + } + [feature = 'leisure_water_park'][zoom >= 17] { marker-file: url('symbols/water_park.svg'); marker-placement: interior; @@ -2051,6 +2098,58 @@ } } + [feature = 'office_accountant'], + [feature = 'office_adoption_agency'], + [feature = 'office_advertising_agency'], + [feature = 'office_architect'], + [feature = 'office_association'], + [feature = 'office_charity'], + [feature = 'office_company'], + [feature = 'office_educational_institution'], + [feature = 'office_employment_agency'], + [feature = 'office_energy_supplier'], + [feature = 'office_estate_agent'], + [feature = 'office_forestry'], + [feature = 'office_foundation'], + [feature = 'office_government'], + [feature = 'office_guide'], + [feature = 'office_insurance'], + [feature = 'office_it'], + [feature = 'office_lawyer'], + [feature = 'office_logistics'], + [feature = 'office_moving_company'], + [feature = 'office_newspaper'], + [feature = 'office_ngo'], + [feature = 'office_notary'], + [feature = 'office_political_party'], + [feature = 'office_private_investigator'], + [feature = 'office_property_management'], + [feature = 'office_quango'], + [feature = 'office_religion'], + [feature = 'office_research'], + [feature = 'office_surveyor'], + [feature = 'office_tax'], + [feature = 'office_tax_advisor'], + [feature = 'office_telecommunication'], + [feature = 'office_therapist'], + [feature = 'office_travel_agent'], + [feature = 'office_water_utility'], + [feature = 'office_real_estate_agent'] { + [way_pixels > 3000][zoom >= 17], + [zoom >= 18] { + text-name: "[name]"; + text-size: @standard-font-size; + text-wrap-width: @standard-wrap-width; + text-line-spacing: @standard-line-spacing-size; + text-dy: 12; + text-fill: @office; + text-face-name: @standard-font; + text-halo-radius: @standard-halo-radius; + text-halo-fill: rgba(255, 255, 255, 0.6); + text-placement: interior; + } + } + [feature = 'shop_supermarket'], [feature = 'shop_department_store'] { [zoom >= 16] { diff --git a/project.mml b/project.mml index 297c2bb554..666bc8bf94 100644 --- a/project.mml +++ b/project.mml @@ -1439,6 +1439,12 @@ Layer: 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', 'charging_station', 'arts_centre', 'ferry_terminal', 'marketplace', 'waste_disposal') THEN amenity ELSE NULL END, 'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END, + 'office_' || CASE WHEN tags->'office' IN ('accountant', 'adoption_agency', 'advertising_agency', 'architect', 'association', 'charity', + 'company', 'educational_institution', 'employment_agency', 'energy_supplier', 'estate_agent', + 'forestry', 'foundation', 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', + 'moving_company', 'newspaper', 'ngo', 'notary', 'political_party', 'private_investigator', + 'property_management', 'quango', 'religion', 'research', 'surveyor', 'tax', 'tax_advisor', + 'telecommunication', 'therapist', 'travel_agent', 'water_utility', 'real_estate_agent') THEN tags->'office' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'fitness_centre', 'fitness_station', 'firepit') THEN leisure ELSE NULL END, 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, @@ -1476,6 +1482,7 @@ Layer: 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site') OR amenity IS NOT NULL -- skip checking a huge list and use a null check OR shop IS NOT NULL + OR tags->'office' IS NOT NULL OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'fitness_centre', 'fitness_station', 'firepit') OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') @@ -1531,6 +1538,12 @@ Layer: 'charging_station', 'arts_centre', 'ferry_terminal', 'marketplace') THEN amenity ELSE NULL END, 'emergency_' || CASE WHEN tags->'emergency' IN ('phone') THEN tags->'emergency' ELSE NULL END, 'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END, + 'office_' || CASE WHEN tags->'office' IN ('accountant', 'adoption_agency', 'advertising_agency', 'architect', 'association', 'charity', + 'company', 'educational_institution', 'employment_agency', 'energy_supplier', 'estate_agent', + 'forestry', 'foundation', 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', + 'moving_company', 'newspaper', 'ngo', 'notary', 'political_party', 'private_investigator', + 'property_management', 'quango', 'religion', 'research', 'surveyor', 'tax', 'tax_advisor', + 'telecommunication', 'therapist', 'travel_agent', 'water_utility', 'real_estate_agent') THEN tags->'office' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', 'dog_park', 'fitness_centre', 'fitness_station', 'firepit') THEN leisure ELSE NULL END, 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, @@ -1579,6 +1592,7 @@ Layer: 'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site') OR amenity IS NOT NULL -- skip checking a huge list and use a null check OR shop IS NOT NULL + OR tags->'office' IS NOT NULL OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', 'dog_park', 'fitness_centre', 'fitness_station', 'firepit') OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk') @@ -1958,6 +1972,12 @@ Layer: 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea', 'coffee', 'tyres', 'pastry', 'chocolate') THEN shop WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END, + 'office_' || CASE WHEN tags->'office' IN ('accountant', 'adoption_agency', 'advertising_agency', 'architect', 'association', 'charity', + 'company', 'educational_institution', 'employment_agency', 'energy_supplier', 'estate_agent', + 'forestry', 'foundation', 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', + 'moving_company', 'newspaper', 'ngo', 'notary', 'political_party', 'private_investigator', + 'property_management', 'quango', 'religion', 'research', 'surveyor', 'tax', 'tax_advisor', + 'telecommunication', 'therapist', 'travel_agent', 'water_utility', 'real_estate_agent') THEN tags->'office' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'fitness_centre', 'sports_centre', 'stadium', 'track', 'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', 'picnic_table', 'dog_park', 'fitness_station', 'firepit') THEN leisure ELSE NULL END, @@ -2003,6 +2023,7 @@ Layer: 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site') OR amenity IS NOT NULL -- skip checking a huge list and use a null check OR shop IS NOT NULL + OR tags->'office' IS NOT NULL OR leisure IS NOT NULL OR landuse IS NOT NULL OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works') @@ -2101,6 +2122,12 @@ Layer: 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea', 'coffee', 'tyres', 'pastry', 'chocolate') THEN shop WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END, + 'office_' || CASE WHEN tags->'office' IN ('accountant', 'adoption_agency', 'advertising_agency', 'architect', 'association', 'charity', + 'company', 'educational_institution', 'employment_agency', 'energy_supplier', 'estate_agent', + 'forestry', 'foundation', 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', + 'moving_company', 'newspaper', 'ngo', 'notary', 'political_party', 'private_investigator', + 'property_management', 'quango', 'religion', 'research', 'surveyor', 'tax', 'tax_advisor', + 'telecommunication', 'therapist', 'travel_agent', 'water_utility', 'real_estate_agent') THEN tags->'office' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'fitness_centre', 'sports_centre', 'stadium', 'track', 'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', 'slipway', 'picnic_table', 'dog_park', 'fitness_station', 'firepit') THEN leisure ELSE NULL END, @@ -2150,6 +2177,7 @@ Layer: 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site') OR amenity IS NOT NULL -- skip checking a huge list and use a null check OR shop IS NOT NULL + OR tags->'office' IS NOT NULL OR leisure IS NOT NULL OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture', From a2de254518785176640add6941328c8bd26b69dd Mon Sep 17 00:00:00 2001 From: Andrzej Date: Sun, 11 Feb 2018 12:04:01 +0000 Subject: [PATCH 2/8] Office tag rendering improvements Added missing office=* values. Broken down office tags into sub-categories. Rendering tweaks (colour, filters) based on sub-categories. --- amenity-points.mss | 189 +++++++++++++++++++++++++++++---------------- project.mml | 51 +++++++----- 2 files changed, 152 insertions(+), 88 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index fef97f1fe3..8f5d5b26e7 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -13,7 +13,7 @@ @memorials: @amenity-brown; @culture: @amenity-brown; @public-service: @amenity-brown; -@office: @amenity-brown; +@office: black; @man-made-icon: #555; @landform-color: #d08f55; @leisure-green: darken(@park, 60%); @@ -874,44 +874,82 @@ } } - [feature = 'office_accountant'], - [feature = 'office_adoption_agency'], - [feature = 'office_advertising_agency'], - [feature = 'office_architect'], - [feature = 'office_association'], - [feature = 'office_charity'], - [feature = 'office_company'], - [feature = 'office_educational_institution'], - [feature = 'office_employment_agency'], - [feature = 'office_energy_supplier'], - [feature = 'office_estate_agent'], - [feature = 'office_forestry'], - [feature = 'office_foundation'], - [feature = 'office_government'], - [feature = 'office_guide'], - [feature = 'office_insurance'], - [feature = 'office_it'], - [feature = 'office_lawyer'], - [feature = 'office_logistics'], - [feature = 'office_moving_company'], - [feature = 'office_newspaper'], - [feature = 'office_ngo'], - [feature = 'office_notary'], - [feature = 'office_political_party'], - [feature = 'office_private_investigator'], - [feature = 'office_property_management'], - [feature = 'office_quango'], - [feature = 'office_religion'], - [feature = 'office_research'], - [feature = 'office_surveyor'], - [feature = 'office_tax'], - [feature = 'office_tax_advisor'], - [feature = 'office_telecommunication'], - [feature = 'office_therapist'], - [feature = 'office_travel_agent'], - [feature = 'office_water_utility'], - [feature = 'office_real_estate_agent'] { - [zoom >= 17] { + + + // government and public institutions + [zoom >= 17] { + [feature = 'office_administrative'], + [feature = 'office_adoption_agency'], + [feature = 'office_government'], + [feature = 'office_employment_agency'], + [feature = 'office_educational_institution'], + [feature = 'office_government'], + [feature = 'office_ngo'], + [feature = 'office_political_party'], + [feature = 'office_quango'], + [feature = 'office_religion'], + [feature = 'office_tax'] { + marker-width: 4; + marker-line-width: 0; + marker-placement: interior; + marker-clip: false; + marker-fill: @public-service; + } + } + + // potentially larger businesses + [zoom >= 17] { + [feature = 'office_energy_supplier'], + [feature = 'office_financial'], + [feature = 'office_newspaper'], + [feature = 'office_research'], + [feature = 'office_telecommunication'], + [feature = 'office_water_utility'], + { + marker-width: 4; + marker-line-width: 0; + marker-placement: interior; + marker-clip: false; + marker-fill: @office; + } + } + + // smaller businesses, treated as shops + [zoom >= 18] { + [feature = 'office_accountant'], + [feature = 'office_advertising_agency'], + [feature = 'office_architect'], + [feature = 'office_estate_agent'], + [feature = 'office_guide'], + [feature = 'office_insurance'], + [feature = 'office_it'], + [feature = 'office_lawyer'], + [feature = 'office_logistics'], + [feature = 'office_moving_company'], + [feature = 'office_notary'], + [feature = 'office_physician'], + [feature = 'office_private_investigator'], + [feature = 'office_property_management'], + [feature = 'office_surveyor'], + [feature = 'office_tax_advisor'], + [feature = 'office_travel_agent'], + [feature = 'office_therapist'] { + marker-width: 4; + marker-line-width: 0; + marker-placement: interior; + marker-clip: false; + marker-fill: @shop-icon; + } + } + + // other offices + [zoom >= 18] { + [feature = 'office_association'], + [feature = 'office_charity'], + [feature = 'office_company'], + [feature = 'office_forestry'], + [feature = 'office_foundation'], + [feature = 'office_yes'] { marker-width: 4; marker-line-width: 0; marker-placement: interior; @@ -2079,7 +2117,25 @@ [feature = 'shop_tyres'], [feature = 'shop_variety_store'], [feature = 'shop_wine'], - [feature = 'shop_other']{ + [feature = 'shop_other'], + [feature = 'office_accountant'], + [feature = 'office_advertising_agency'], + [feature = 'office_architect'], + [feature = 'office_estate_agent'], + [feature = 'office_guide'], + [feature = 'office_insurance'], + [feature = 'office_it'], + [feature = 'office_lawyer'], + [feature = 'office_logistics'], + [feature = 'office_moving_company'], + [feature = 'office_notary'], + [feature = 'office_physician'], + [feature = 'office_private_investigator'], + [feature = 'office_property_management'], + [feature = 'office_surveyor'], + [feature = 'office_tax_advisor'], + [feature = 'office_therapist'], + [feature = 'office_travel_agent'] { [way_pixels > 3000][zoom >= 17], [zoom >= 18] { text-name: "[name]"; @@ -2098,45 +2154,42 @@ } } - [feature = 'office_accountant'], + // government and public institutions + [feature = 'office_administrative'], [feature = 'office_adoption_agency'], - [feature = 'office_advertising_agency'], - [feature = 'office_architect'], - [feature = 'office_association'], - [feature = 'office_charity'], - [feature = 'office_company'], [feature = 'office_educational_institution'], [feature = 'office_employment_agency'], - [feature = 'office_energy_supplier'], - [feature = 'office_estate_agent'], - [feature = 'office_forestry'], - [feature = 'office_foundation'], [feature = 'office_government'], - [feature = 'office_guide'], - [feature = 'office_insurance'], - [feature = 'office_it'], - [feature = 'office_lawyer'], - [feature = 'office_logistics'], - [feature = 'office_moving_company'], - [feature = 'office_newspaper'], [feature = 'office_ngo'], - [feature = 'office_notary'], [feature = 'office_political_party'], - [feature = 'office_private_investigator'], - [feature = 'office_property_management'], [feature = 'office_quango'], [feature = 'office_religion'], + [feature = 'office_tax'] { + [zoom >= 18], + [zoom >= 17][way_pixels > 3000] { + marker-width: 4; + marker-line-width: 0; + marker-placement: interior; + marker-clip: false; + marker-fill: @public-service; + } + } + + // offices + [feature = 'office_association'], + [feature = 'office_charity'], + [feature = 'office_company'], + [feature = 'office_energy_supplier'], + [feature = 'office_financial'], + [feature = 'office_forestry'], + [feature = 'office_foundation'], + [feature = 'office_newspaper'], [feature = 'office_research'], - [feature = 'office_surveyor'], - [feature = 'office_tax'], - [feature = 'office_tax_advisor'], [feature = 'office_telecommunication'], - [feature = 'office_therapist'], - [feature = 'office_travel_agent'], [feature = 'office_water_utility'], - [feature = 'office_real_estate_agent'] { - [way_pixels > 3000][zoom >= 17], - [zoom >= 18] { + [feature = 'office_yes'] { + [zoom >= 18], + [zoom >= 17][way_pixels > 3000] { text-name: "[name]"; text-size: @standard-font-size; text-wrap-width: @standard-wrap-width; diff --git a/project.mml b/project.mml index 666bc8bf94..b1825d405f 100644 --- a/project.mml +++ b/project.mml @@ -1439,12 +1439,14 @@ Layer: 'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', 'charging_station', 'arts_centre', 'ferry_terminal', 'marketplace', 'waste_disposal') THEN amenity ELSE NULL END, 'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END, - 'office_' || CASE WHEN tags->'office' IN ('accountant', 'adoption_agency', 'advertising_agency', 'architect', 'association', 'charity', - 'company', 'educational_institution', 'employment_agency', 'energy_supplier', 'estate_agent', - 'forestry', 'foundation', 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', - 'moving_company', 'newspaper', 'ngo', 'notary', 'political_party', 'private_investigator', + 'office_' || CASE WHEN tags->'office' IN ('accountant', 'administrative', 'adoption_agency', 'advertising_agency', 'architect', + 'association', 'charity', 'company', 'educational_institution', 'employment_agency', + 'energy_supplier', 'estate_agent', 'financial', 'forestry', 'foundation', + 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', 'moving_company', + 'newspaper', 'ngo', 'notary', 'physician', 'political_party', 'private_investigator', 'property_management', 'quango', 'religion', 'research', 'surveyor', 'tax', 'tax_advisor', - 'telecommunication', 'therapist', 'travel_agent', 'water_utility', 'real_estate_agent') THEN tags->'office' ELSE NULL END, + 'telecommunication', 'therapist', 'travel_agent', 'water_utility', + 'yes') THEN tags->'office' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'fitness_centre', 'fitness_station', 'firepit') THEN leisure ELSE NULL END, 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, @@ -1465,6 +1467,7 @@ Layer: tags->'icao' as icao, tags->'iata' as iata, tags->'recycling_type' as recycling_type, + tags->'office' as office, CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', @@ -1538,12 +1541,14 @@ Layer: 'charging_station', 'arts_centre', 'ferry_terminal', 'marketplace') THEN amenity ELSE NULL END, 'emergency_' || CASE WHEN tags->'emergency' IN ('phone') THEN tags->'emergency' ELSE NULL END, 'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END, - 'office_' || CASE WHEN tags->'office' IN ('accountant', 'adoption_agency', 'advertising_agency', 'architect', 'association', 'charity', - 'company', 'educational_institution', 'employment_agency', 'energy_supplier', 'estate_agent', - 'forestry', 'foundation', 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', - 'moving_company', 'newspaper', 'ngo', 'notary', 'political_party', 'private_investigator', + 'office_' || CASE WHEN tags->'office' IN ('accountant', 'administrative', 'adoption_agency', 'advertising_agency', 'architect', + 'association', 'charity', 'company', 'educational_institution', 'employment_agency', + 'energy_supplier', 'estate_agent', 'financial', 'forestry', 'foundation', + 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', 'moving_company', + 'newspaper', 'ngo', 'notary', 'physician', 'political_party', 'private_investigator', 'property_management', 'quango', 'religion', 'research', 'surveyor', 'tax', 'tax_advisor', - 'telecommunication', 'therapist', 'travel_agent', 'water_utility', 'real_estate_agent') THEN tags->'office' ELSE NULL END, + 'telecommunication', 'therapist', 'travel_agent', 'water_utility', + 'yes') THEN tags->'office' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway', 'dog_park', 'fitness_centre', 'fitness_station', 'firepit') THEN leisure ELSE NULL END, 'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END, @@ -1575,6 +1580,7 @@ Layer: tags->'icao' as icao, tags->'iata' as iata, tags->'recycling_type' as recycling_type, + tags->'office' as office, CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', @@ -1972,12 +1978,14 @@ Layer: 'perfumery', 'cosmetics', 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea', 'coffee', 'tyres', 'pastry', 'chocolate') THEN shop WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END, - 'office_' || CASE WHEN tags->'office' IN ('accountant', 'adoption_agency', 'advertising_agency', 'architect', 'association', 'charity', - 'company', 'educational_institution', 'employment_agency', 'energy_supplier', 'estate_agent', - 'forestry', 'foundation', 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', - 'moving_company', 'newspaper', 'ngo', 'notary', 'political_party', 'private_investigator', + 'office_' || CASE WHEN tags->'office' IN ('accountant', 'administrative', 'adoption_agency', 'advertising_agency', 'architect', + 'association', 'charity', 'company', 'educational_institution', 'employment_agency', + 'energy_supplier', 'estate_agent', 'financial', 'forestry', 'foundation', + 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', 'moving_company', + 'newspaper', 'ngo', 'notary', 'physician', 'political_party', 'private_investigator', 'property_management', 'quango', 'religion', 'research', 'surveyor', 'tax', 'tax_advisor', - 'telecommunication', 'therapist', 'travel_agent', 'water_utility', 'real_estate_agent') THEN tags->'office' ELSE NULL END, + 'telecommunication', 'therapist', 'travel_agent', 'water_utility', + 'yes') THEN tags->'office' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'fitness_centre', 'sports_centre', 'stadium', 'track', 'pitch', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', 'picnic_table', 'dog_park', 'fitness_station', 'firepit') THEN leisure ELSE NULL END, @@ -2013,6 +2021,7 @@ Layer: tags->'icao' as icao, tags->'iata' as iata, tags->'recycling_type' as recycling_type, + tags->'office' as office, ref, way_area, CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building @@ -2122,12 +2131,14 @@ Layer: 'variety_store', 'wine', 'outdoor', 'copyshop', 'sports', 'deli', 'tobacco', 'art', 'tea', 'coffee', 'tyres', 'pastry', 'chocolate') THEN shop WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE 'other' END, - 'office_' || CASE WHEN tags->'office' IN ('accountant', 'adoption_agency', 'advertising_agency', 'architect', 'association', 'charity', - 'company', 'educational_institution', 'employment_agency', 'energy_supplier', 'estate_agent', - 'forestry', 'foundation', 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', - 'moving_company', 'newspaper', 'ngo', 'notary', 'political_party', 'private_investigator', + 'office_' || CASE WHEN tags->'office' IN ('accountant', 'administrative', 'adoption_agency', 'advertising_agency', 'architect', + 'association', 'charity', 'company', 'educational_institution', 'employment_agency', + 'energy_supplier', 'estate_agent', 'financial', 'forestry', 'foundation', + 'government', 'guide', 'insurance', 'it', 'lawyer', 'logistics', 'moving_company', + 'newspaper', 'ngo', 'notary', 'physician', 'political_party', 'private_investigator', 'property_management', 'quango', 'religion', 'research', 'surveyor', 'tax', 'tax_advisor', - 'telecommunication', 'therapist', 'travel_agent', 'water_utility', 'real_estate_agent') THEN tags->'office' ELSE NULL END, + 'telecommunication', 'therapist', 'travel_agent', 'water_utility', + 'yes') THEN tags->'office' ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('swimming_pool', 'water_park', 'miniature_golf', 'golf_course', 'fitness_centre', 'sports_centre', 'stadium', 'track', 'pitch','playground', 'park', 'recreation_ground', 'common', 'garden', 'nature_reserve', 'marina', 'slipway', 'picnic_table', 'dog_park', 'fitness_station', 'firepit') THEN leisure ELSE NULL END, From bd8df68ac7a53de1ea53a858626da1846d177eaa Mon Sep 17 00:00:00 2001 From: Andrzej Date: Tue, 20 Feb 2018 22:33:35 +0000 Subject: [PATCH 3/8] Changed office= point colour to darkblue --- amenity-points.mss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amenity-points.mss b/amenity-points.mss index 8f5d5b26e7..f5063040e9 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -13,7 +13,7 @@ @memorials: @amenity-brown; @culture: @amenity-brown; @public-service: @amenity-brown; -@office: black; +@office: darkblue; @man-made-icon: #555; @landform-color: #d08f55; @leisure-green: darken(@park, 60%); From d06f3abaf15c24d71cd8fbff1b0395a95ff3d7dd Mon Sep 17 00:00:00 2001 From: Andrzej Date: Tue, 20 Feb 2018 22:58:25 +0000 Subject: [PATCH 4/8] Addjusted spacing between labels and points --- amenity-points.mss | 49 +++++++++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index f5063040e9..495e1bf5cd 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -2117,7 +2117,26 @@ [feature = 'shop_tyres'], [feature = 'shop_variety_store'], [feature = 'shop_wine'], - [feature = 'shop_other'], + [feature = 'shop_other'] { + [way_pixels > 3000][zoom >= 17], + [zoom >= 18] { + text-name: "[name]"; + text-size: @standard-font-size; + text-wrap-width: @standard-wrap-width; + text-line-spacing: @standard-line-spacing-size; + text-dy: 12; + text-fill: @shop-text; + text-face-name: @standard-font; + text-halo-radius: @standard-halo-radius; + text-halo-fill: rgba(255, 255, 255, 0.6); + text-placement: interior; + [feature = 'shop_car_repair'] { + text-fill: @amenity-brown; + } + } + } + + // smaller businesses, treated as shops [feature = 'office_accountant'], [feature = 'office_advertising_agency'], [feature = 'office_architect'], @@ -2136,21 +2155,18 @@ [feature = 'office_tax_advisor'], [feature = 'office_therapist'], [feature = 'office_travel_agent'] { - [way_pixels > 3000][zoom >= 17], - [zoom >= 18] { + [zoom >= 18], + [way_pixels > 3000][zoom >= 17] { text-name: "[name]"; text-size: @standard-font-size; text-wrap-width: @standard-wrap-width; text-line-spacing: @standard-line-spacing-size; - text-dy: 12; + text-dy: 8; text-fill: @shop-text; text-face-name: @standard-font; text-halo-radius: @standard-halo-radius; text-halo-fill: rgba(255, 255, 255, 0.6); text-placement: interior; - [feature = 'shop_car_repair'] { - text-fill: @amenity-brown; - } } } @@ -2167,11 +2183,16 @@ [feature = 'office_tax'] { [zoom >= 18], [zoom >= 17][way_pixels > 3000] { - marker-width: 4; - marker-line-width: 0; - marker-placement: interior; - marker-clip: false; - marker-fill: @public-service; + text-name: "[name]"; + text-size: @standard-font-size; + text-wrap-width: @standard-wrap-width; + text-line-spacing: @standard-line-spacing-size; + text-dy: 8; + text-fill: @public-service; + text-face-name: @standard-font; + text-halo-radius: @standard-halo-radius; + text-halo-fill: rgba(255, 255, 255, 0.6); + text-placement: interior; } } @@ -2194,7 +2215,7 @@ text-size: @standard-font-size; text-wrap-width: @standard-wrap-width; text-line-spacing: @standard-line-spacing-size; - text-dy: 12; + text-dy: 8; text-fill: @office; text-face-name: @standard-font; text-halo-radius: @standard-halo-radius; @@ -2210,7 +2231,7 @@ text-size: @standard-font-size; text-wrap-width: @standard-wrap-width; text-line-spacing: @standard-line-spacing-size; - text-dy: 12; + text-dy: 8; text-fill: @shop-text; text-face-name: @standard-font; text-halo-radius: @standard-halo-radius; From 1e4922adf7a074f3be1dc65cbecedc6b8e2642f0 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Sun, 11 Mar 2018 13:12:58 +0000 Subject: [PATCH 5/8] Reverted an accidental change of shop_supermarket label text_dy --- amenity-points.mss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amenity-points.mss b/amenity-points.mss index 495e1bf5cd..a0a8a64fb0 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -2231,7 +2231,7 @@ text-size: @standard-font-size; text-wrap-width: @standard-wrap-width; text-line-spacing: @standard-line-spacing-size; - text-dy: 8; + text-dy: 12; text-fill: @shop-text; text-face-name: @standard-font; text-halo-radius: @standard-halo-radius; From a01c0587f694f4475644880faabd1221059f7996 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Sun, 11 Mar 2018 13:34:36 +0000 Subject: [PATCH 6/8] Fixed double building+office labels Matched filtering options of points and labels --- amenity-points.mss | 115 ++++++++++++++++++++++++++------------------- 1 file changed, 66 insertions(+), 49 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index a0a8a64fb0..2f2582358d 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -915,7 +915,8 @@ } // smaller businesses, treated as shops - [zoom >= 18] { + [zoom >= 18], + [zoom >= 17][way_pixels > 3000] { [feature = 'office_accountant'], [feature = 'office_advertising_agency'], [feature = 'office_architect'], @@ -943,7 +944,8 @@ } // other offices - [zoom >= 18] { + [zoom >= 18], + [zoom >= 17][way_pixels > 3000] { [feature = 'office_association'], [feature = 'office_charity'], [feature = 'office_company'], @@ -2137,26 +2139,26 @@ } // smaller businesses, treated as shops - [feature = 'office_accountant'], - [feature = 'office_advertising_agency'], - [feature = 'office_architect'], - [feature = 'office_estate_agent'], - [feature = 'office_guide'], - [feature = 'office_insurance'], - [feature = 'office_it'], - [feature = 'office_lawyer'], - [feature = 'office_logistics'], - [feature = 'office_moving_company'], - [feature = 'office_notary'], - [feature = 'office_physician'], - [feature = 'office_private_investigator'], - [feature = 'office_property_management'], - [feature = 'office_surveyor'], - [feature = 'office_tax_advisor'], - [feature = 'office_therapist'], - [feature = 'office_travel_agent'] { - [zoom >= 18], - [way_pixels > 3000][zoom >= 17] { + [zoom >= 18], + [zoom >= 17][way_pixels > 3000] { + [feature = 'office_accountant'], + [feature = 'office_advertising_agency'], + [feature = 'office_architect'], + [feature = 'office_estate_agent'], + [feature = 'office_guide'], + [feature = 'office_insurance'], + [feature = 'office_it'], + [feature = 'office_lawyer'], + [feature = 'office_logistics'], + [feature = 'office_moving_company'], + [feature = 'office_notary'], + [feature = 'office_physician'], + [feature = 'office_private_investigator'], + [feature = 'office_property_management'], + [feature = 'office_surveyor'], + [feature = 'office_tax_advisor'], + [feature = 'office_therapist'], + [feature = 'office_travel_agent'] { text-name: "[name]"; text-size: @standard-font-size; text-wrap-width: @standard-wrap-width; @@ -2171,18 +2173,17 @@ } // government and public institutions - [feature = 'office_administrative'], - [feature = 'office_adoption_agency'], - [feature = 'office_educational_institution'], - [feature = 'office_employment_agency'], - [feature = 'office_government'], - [feature = 'office_ngo'], - [feature = 'office_political_party'], - [feature = 'office_quango'], - [feature = 'office_religion'], - [feature = 'office_tax'] { - [zoom >= 18], - [zoom >= 17][way_pixels > 3000] { + [zoom >= 17] { + [feature = 'office_administrative'], + [feature = 'office_adoption_agency'], + [feature = 'office_educational_institution'], + [feature = 'office_employment_agency'], + [feature = 'office_government'], + [feature = 'office_ngo'], + [feature = 'office_political_party'], + [feature = 'office_quango'], + [feature = 'office_religion'], + [feature = 'office_tax'] { text-name: "[name]"; text-size: @standard-font-size; text-wrap-width: @standard-wrap-width; @@ -2196,21 +2197,37 @@ } } - // offices - [feature = 'office_association'], - [feature = 'office_charity'], - [feature = 'office_company'], - [feature = 'office_energy_supplier'], - [feature = 'office_financial'], - [feature = 'office_forestry'], - [feature = 'office_foundation'], - [feature = 'office_newspaper'], - [feature = 'office_research'], - [feature = 'office_telecommunication'], - [feature = 'office_water_utility'], - [feature = 'office_yes'] { - [zoom >= 18], - [zoom >= 17][way_pixels > 3000] { + // potentially larger businesses + [zoom >= 17] { + [feature = 'office_energy_supplier'], + [feature = 'office_financial'], + [feature = 'office_newspaper'], + [feature = 'office_research'], + [feature = 'office_telecommunication'], + [feature = 'office_water_utility'], + { + text-name: "[name]"; + text-size: @standard-font-size; + text-wrap-width: @standard-wrap-width; + text-line-spacing: @standard-line-spacing-size; + text-dy: 8; + text-fill: @office; + text-face-name: @standard-font; + text-halo-radius: @standard-halo-radius; + text-halo-fill: rgba(255, 255, 255, 0.6); + text-placement: interior; + } + } + + // other offices + [zoom >= 18], + [zoom >= 17][way_pixels > 3000] { + [feature = 'office_association'], + [feature = 'office_charity'], + [feature = 'office_company'], + [feature = 'office_forestry'], + [feature = 'office_foundation'], + [feature = 'office_yes'] { text-name: "[name]"; text-size: @standard-font-size; text-wrap-width: @standard-wrap-width; From 54778f8e0c0b8d037dd06db290401362f9514731 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Sun, 11 Mar 2018 13:40:44 +0000 Subject: [PATCH 7/8] Matched dot sizes at z18+ --- amenity-points.mss | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/amenity-points.mss b/amenity-points.mss index 2f2582358d..f39157f84c 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -890,6 +890,9 @@ [feature = 'office_religion'], [feature = 'office_tax'] { marker-width: 4; + [zoom >= 18] { + marker-width: 6; + } marker-line-width: 0; marker-placement: interior; marker-clip: false; @@ -907,6 +910,9 @@ [feature = 'office_water_utility'], { marker-width: 4; + [zoom >= 18] { + marker-width: 6; + } marker-line-width: 0; marker-placement: interior; marker-clip: false; @@ -936,6 +942,9 @@ [feature = 'office_travel_agent'], [feature = 'office_therapist'] { marker-width: 4; + [zoom >= 18] { + marker-width: 6; + } marker-line-width: 0; marker-placement: interior; marker-clip: false; @@ -953,6 +962,9 @@ [feature = 'office_foundation'], [feature = 'office_yes'] { marker-width: 4; + [zoom >= 18] { + marker-width: 6; + } marker-line-width: 0; marker-placement: interior; marker-clip: false; From 166b09738158c9414d81c755df7a93f1a2af7741 Mon Sep 17 00:00:00 2001 From: Andrzej Date: Thu, 15 Mar 2018 23:34:33 +0000 Subject: [PATCH 8/8] Merge fixes --- project.mml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/project.mml b/project.mml index b1825d405f..261c45c30e 100644 --- a/project.mml +++ b/project.mml @@ -1466,8 +1466,8 @@ Layer: tags->'power_source' as power_source, tags->'icao' as icao, tags->'iata' as iata, - tags->'recycling_type' as recycling_type, tags->'office' as office, + tags->'recycling_type' as recycling_type, CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', @@ -1579,8 +1579,8 @@ Layer: tags->'power_source' as power_source, tags->'icao' as icao, tags->'iata' as iata, - tags->'recycling_type' as recycling_type, tags->'office' as office, + tags->'recycling_type' as recycling_type, CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet', @@ -2020,8 +2020,8 @@ Layer: tags->'operator' as operator, tags->'icao' as icao, tags->'iata' as iata, - tags->'recycling_type' as recycling_type, tags->'office' as office, + tags->'recycling_type' as recycling_type, ref, way_area, CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building