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

Add rendering for healthcare tag scheme #3498

Merged
merged 26 commits into from
Nov 24, 2018
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c319532
change healthcare colour
jragusa Sep 17, 2018
503eb48
add support of healthcare tag scheme
jragusa Oct 4, 2018
e243ff1
replace hospital icon
jragusa Oct 4, 2018
6481cee
add support of healthcare tag scheme
jragusa Oct 4, 2018
b6fe1b1
support healthcare tag scheme
jragusa Oct 19, 2018
815b165
change health colour and shift dentist icon to z18
jragusa Oct 19, 2018
8918768
shift amenity=doctors to z17
jragusa Oct 24, 2018
60a4b88
add healthcare duplications with amenity and remove whitespaces
jragusa Oct 26, 2018
2480ce2
fix error of healthcare column
jragusa Nov 6, 2018
50e07e1
Merge branch 'master' into healthcare
jragusa Nov 6, 2018
06a2e96
Fix healthcare=doctor and add healthcare=pharmacy
jragusa Nov 9, 2018
e73e5d6
remove whitespaces
jragusa Nov 9, 2018
c96dd04
change to darker colour
jragusa Nov 9, 2018
8cbd2fc
Merge branch 'master' into healthcare
jragusa Nov 9, 2018
ad0cafe
Merge branch 'master' into healthcare
jragusa Nov 16, 2018
5f22b9c
remove healthcare in lua script
jragusa Nov 20, 2018
dc818f2
fix zoom condition of dentist
jragusa Nov 20, 2018
1e889f8
Merge branch 'healthcare' of https://github.com/jragusa/openstreetmap…
jragusa Nov 20, 2018
e72e3d8
add hospice
jragusa Nov 22, 2018
1f6fd4a
group healthcare=centre with amenity=doctors
jragusa Nov 22, 2018
01aaf06
add specific behaviour for healthcare=doctor
jragusa Nov 22, 2018
7956ac6
remove healthcare=pharmacy
jragusa Nov 22, 2018
b16bdc3
move block amenity=pharmacy
jragusa Nov 22, 2018
dfc4a2a
change chiropractor to dialysis and remove healthcare=hospice
jragusa Nov 22, 2018
a3b157e
move block amenity=hospital with other amenity/healthcare features
jragusa Nov 22, 2018
3f6a811
add dialysis and remove chiropractor and pharmacy in project.mml
jragusa Nov 23, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
80 changes: 71 additions & 9 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
@accommodation-icon: @transportation-icon;
@accommodation-text: @transportation-text;
@airtransport: #8461C4; //also ferry_terminal
@health-color: #da0092;
@health-color: #BF0000;
@amenity-brown: #734a08;
@gastronomy-icon: #C77400;
@gastronomy-text: darken(@gastronomy-icon, 5%);
Expand Down Expand Up @@ -339,7 +339,8 @@
marker-clip: false;
}

[feature = 'amenity_hospital'][zoom >= 15] {
[feature = 'amenity_hospital'][zoom >= 15],
[feature = 'healthcare_hospital'][zoom >= 15] {
marker-file: url('symbols/amenity/hospital.svg');
marker-fill: @health-color;
marker-placement: interior;
Expand Down Expand Up @@ -615,23 +616,33 @@
}
}

[feature = 'amenity_pharmacy'][zoom >= 17] {
[feature = 'amenity_pharmacy'][zoom >= 17],
[feature = 'healthcare_pharmacy'][zoom >= 17] {
marker-file: url('symbols/amenity/pharmacy.svg');
marker-fill: @health-color;
marker-placement: interior;
marker-clip: false;
}

[feature = 'amenity_clinic'][zoom >= 16],
[feature = 'amenity_doctors'][zoom >= 17] {
[feature = 'amenity_clinic'][zoom >= 17],
[feature = 'healthcare_clinic'][zoom >= 17],
[feature = 'amenity_doctors'][zoom >= 17],
[feature = 'healthcare_doctor'][zoom >= 17] {
marker-file: url('symbols/amenity/doctors.svg');
marker-fill: @health-color;
marker-placement: interior;
marker-clip: false;
}

[feature = 'amenity_dentist'][zoom >= 17] {
marker-file: url('symbols/amenity/dentist.svg');
[feature = 'amenity_dentist'][zoom >= 17],
[feature = 'healthcare_dentist'][zoom >= 17] {
[zoom >= 17][zoom < 18] {
marker-width: 4;
marker-line-width: 0;
}
[zoom >= 18] {
marker-file: url('symbols/amenity/dentist.svg');
}
marker-fill: @health-color;
marker-placement: interior;
marker-clip: false;
Expand All @@ -644,6 +655,35 @@
marker-clip: false;
}

[feature = 'healthcare_alternative'],
[feature = 'healthcare_audiologist'],
[feature = 'healthcare_birthing_center'],
[feature = 'healthcare_blood_bank'],
[feature = 'healthcare_blood_donation'],
[feature = 'healthcare_centre'],
[feature = 'healthcare_chiropractor'],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one looks like a leftover - it's not enlisted on https://wiki.openstreetmap.org/wiki/Key:healthcare#Values list, so please remove it. Perhaps it should be healthcare_dialysis, because this one is enlisted on the wiki, but it's missing here.

Of course fix also all the other places where chiropractor is present instead of dialysis.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I made a combination of the most cited occurrences (first page) in the taginfo and the wiki page. Both are similar except that chiropractor is more popular (180 occurrences) than dialysis (18 occurrences, second page).
I forgot to mention dialysis in the list and I'm adding it but what about chiropractor ? I notice also that I also forgot hospice.

[feature = 'healthcare_laboratory'],
[feature = 'healthcare_midwife'],
[feature = 'healthcare_occupational_therapist'],
[feature = 'healthcare_optometrist'],
[feature = 'healthcare_physiotherapist'],
[feature = 'healthcare_podiatrist'],
[feature = 'healthcare_psychotherapist'],
[feature = 'healthcare_rehabilitation'],
[feature = 'healthcare_speech_therapist'],
[feature = 'healthcare_yes'] {
[zoom >= 17] {
marker-width: 4;
[zoom >= 18] {
marker-width: 6;
}
marker-line-width: 0;
marker-placement: interior;
marker-clip: false;
marker-fill: @health-color;
}
}

[feature = 'amenity_place_of_worship'][zoom >= 16] {
marker-file: url('symbols/amenity/place_of_worship.svg');
marker-fill: #000000;
Expand Down Expand Up @@ -2540,7 +2580,8 @@
text-placement: interior;
}

[feature = 'amenity_hospital'][zoom >= 16] {
[feature = 'amenity_hospital'][zoom >= 16],
[feature = 'healthcare_hospital'][zoom >= 16] {
text-name: "[name]";
text-fill: @health-color;
text-size: @standard-font-size;
Expand All @@ -2558,7 +2599,28 @@
[feature = 'amenity_pharmacy'],
[feature = 'amenity_doctors'],
[feature = 'amenity_dentist'],
[feature = 'amenity_veterinary'] {
[feature = 'amenity_veterinary'],
[feature = 'healthcare_alternative'],
[feature = 'healthcare_audiologist'],
[feature = 'healthcare_birthing_center'],
[feature = 'healthcare_blood_bank'],
[feature = 'healthcare_blood_donation'],
[feature = 'healthcare_centre'],
[feature = 'healthcare_chiropractor'],
[feature = 'healthcare_clinic'],
[feature = 'healthcare_dentist'],
[feature = 'healthcare_doctor'],
[feature = 'healthcare_laboratory'],
[feature = 'healthcare_midwife'],
[feature = 'healthcare_pharmacy'],
[feature = 'healthcare_occupational_therapist'],
[feature = 'healthcare_optometrist'],
[feature = 'healthcare_physiotherapist'],
[feature = 'healthcare_podiatrist'],
[feature = 'healthcare_psychotherapist'],
[feature = 'healthcare_rehabilitation'],
[feature = 'healthcare_speech_therapist'],
[feature = 'healthcare_yes'] {
[zoom >= 17] {
text-name: "[name]";
text-size: @standard-font-size;
Expand Down
22 changes: 22 additions & 0 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ Layer:
'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') THEN amenity ELSE NULL END)) AS amenity,
('healthcare_' || (CASE WHEN tags->'healthcare' IN ('clinic' ,'hospital') THEN tags->'healthcare' ELSE NULL END)) AS healthcare,
('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass',
'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture',
'recreation_ground', 'village_green', 'retail', 'industrial', 'railway', 'commercial',
Expand All @@ -146,6 +147,7 @@ Layer:
OR amenity IN ('parking', 'bicycle_parking', 'motorcycle_parking', 'taxi', 'university', '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 tags->'healthcare' IN ('clinic', 'hospital')
OR man_made IN ('works', 'wastewater_plant','water_works')
OR "natural" IN ('beach', 'shoal', 'heath', 'mud', 'marsh', 'wetland', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')
OR power IN ('station', 'sub_station', 'substation', 'generator')
Expand Down Expand Up @@ -1458,6 +1460,9 @@ Layer:
'prison', 'hunting_stand', 'nightclub', 'veterinary', 'social_facility', 'vehicle_inspection',
'charging_station', 'arts_centre', 'ferry_terminal', 'marketplace', 'waste_disposal', 'shower', 'bbq',
'nursing_home', 'childcare', 'driving_school', 'casino', 'boat_rental', 'bicycle_repair_station') THEN amenity ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('alternative', 'audiologist', 'birthing_center', 'blood_bank', 'blood_donation', 'centre', 'chiropractor',
'clinic', 'dentist', 'doctor', 'hospital', 'laboratory', 'midwife', 'occupational_therapist', 'optometrist', 'pharmacy',
'physiotherapist', 'podiatrist', 'psychotherapist', 'rehabilitation', 'speech_therapist', 'yes') THEN tags->'healthcare' ELSE NULL END,
'advertising_' || CASE WHEN tags->'advertising' in ('column') THEN tags->'advertising' 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 ('no', 'vacant', 'closed', 'disused', 'empty') OR (tags->'office') IS NULL THEN NULL ELSE '' END,
Expand Down Expand Up @@ -1506,6 +1511,7 @@ Layer:
tags->'castle_type' as castle_type,
tags->'sport' as sport,
tags->'information' as information,
tags->'healthcare' as healthcare,
tags->'memorial' as memorial,
tags->'artwork_type' as artwork_type,
CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'bed', 'bookmaker', 'books', 'butcher', 'clothes', 'computer',
Expand All @@ -1526,6 +1532,7 @@ Layer:
OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'wilderness_hut', 'guest_house', 'apartment', 'hostel',
'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site', 'gallery')
OR amenity IS NOT NULL -- skip checking a huge list and use a null check
OR (tags->'healthcare') IS NOT NULL
OR tags->'advertising' IN ('column')
OR shop IS NOT NULL
OR (tags->'office') IS NOT NULL
Expand Down Expand Up @@ -1591,6 +1598,9 @@ Layer:
'charging_station', 'arts_centre', 'ferry_terminal', 'marketplace', 'shower', 'bbq',
'nursing_home', 'childcare', 'driving_school', 'casino', 'boat_rental', 'bicycle_repair_station') THEN amenity ELSE NULL END,
'amenity_' || CASE WHEN amenity IN ('parking_entrance') AND tags->'parking' IN ('underground') AND (access IS NULL OR access NOT IN ('private', 'no')) THEN amenity ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('alternative', 'audiologist', 'birthing_center', 'blood_bank', 'blood_donation', 'centre', 'chiropractor',
'clinic', 'dentist', 'doctor', 'hospital', 'laboratory', 'midwife', 'occupational_therapist', 'optometrist', 'pharmacy',
'physiotherapist', 'podiatrist', 'psychotherapist', 'rehabilitation', 'speech_therapist', 'yes') THEN tags->'healthcare' ELSE NULL END,
'advertising_' || CASE WHEN tags->'advertising' in ('column') THEN tags->'advertising' 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,
Expand Down Expand Up @@ -1659,6 +1669,7 @@ Layer:
tags->'castle_type' as castle_type,
tags->'sport' as sport,
tags->'information' as information,
tags->'healthcare' as healthcare,
tags->'memorial' as memorial,
tags->'artwork_type' as artwork_type,
CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'bed', 'bookmaker', 'books', 'butcher', 'clothes', 'computer',
Expand All @@ -1679,6 +1690,7 @@ Layer:
OR tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'wilderness_hut', 'guest_house', 'apartment', 'hostel',
'hotel', 'motel', 'information', 'museum', 'viewpoint', 'picnic_site', 'gallery')
OR amenity IS NOT NULL -- skip checking a huge list and use a null check
OR (tags->'healthcare') IS NOT NULL
OR shop IS NOT NULL
OR tags->'advertising' IN ('column')
OR (tags->'office') IS NOT NULL
Expand Down Expand Up @@ -2068,6 +2080,9 @@ Layer:
'nightclub', 'veterinary', 'social_facility', 'vehicle_inspection', 'charging_station', 'arts_centre',
'ferry_terminal', 'marketplace', 'shower', 'bbq', 'nursing_home', 'childcare', 'driving_school',
'casino', 'boat_rental', 'bicycle_repair_station') THEN amenity ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('alternative', 'audiologist', 'birthing_center', 'blood_bank', 'blood_donation', 'centre', 'chiropractor',
'clinic', 'dentist', 'doctor', 'hospital', 'laboratory', 'midwife', 'occupational_therapist', 'optometrist', 'pharmacy',
'physiotherapist', 'podiatrist', 'psychotherapist', 'rehabilitation', 'speech_therapist', 'yes') THEN tags->'healthcare' ELSE NULL END,
'advertising_' || CASE WHEN tags->'advertising' in ('column') THEN tags->'advertising' else NULL END,
'shop_' || CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'bed', 'bookmaker', 'books', 'butcher', 'clothes', 'computer', 'confectionery',
'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre',
Expand Down Expand Up @@ -2138,6 +2153,7 @@ Layer:
tags->'castle_type' as castle_type,
tags->'sport' as sport,
tags->'information' as information,
tags->'healthcare' as healthcare,
tags->'memorial' as memorial,
tags->'artwork_type' as artwork_type,
ref,
Expand All @@ -2149,6 +2165,7 @@ Layer:
OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'wilderness_hut', 'guest_house', 'apartment',
'camp_site', 'caravan_site', 'theme_park', 'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site', 'gallery')
OR amenity IS NOT NULL -- skip checking a huge list and use a null check
OR (tags->'healthcare') IS NOT NULL
OR tags->'advertising' IN ('column')
OR shop IS NOT NULL
OR (tags->'office') IS NOT NULL
Expand Down Expand Up @@ -2253,6 +2270,9 @@ Layer:
'charging_station', 'arts_centre', 'ferry_terminal', 'marketplace', 'shower', 'bbq',
'nursing_home', 'childcare', 'driving_school', 'casino', 'boat_rental', 'bicycle_repair_station') THEN amenity ELSE NULL END,
'amenity_' || CASE WHEN amenity IN ('parking_entrance') AND tags->'parking' IN ('underground') AND (access IS NULL OR access NOT IN ('private', 'no')) THEN amenity ELSE NULL END,
'healthcare_' || CASE WHEN tags->'healthcare' IN ('alternative', 'audiologist', 'birthing_center', 'blood_bank', 'blood_donation', 'centre', 'chiropractor',
'clinic', 'dentist', 'doctor', 'hospital', 'laboratory', 'midwife', 'occupational_therapist', 'optometrist', 'pharmacy',
'physiotherapist', 'podiatrist', 'psychotherapist', 'rehabilitation', 'speech_therapist', 'yes') THEN tags->'healthcare' ELSE NULL END,
'advertising_' || CASE WHEN tags->'advertising' in ('column') THEN tags->'advertising' else NULL END,
'shop_' || CASE WHEN shop IN ('supermarket', 'bag','bakery', 'beauty', 'bed', 'bookmaker', 'books', 'butcher', 'clothes', 'computer', 'confectionery', 'fashion',
'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist', 'garden_centre', 'hairdresser',
Expand Down Expand Up @@ -2324,6 +2344,7 @@ Layer:
tags->'castle_type' as castle_type,
tags->'sport' as sport,
tags->'information' as information,
tags->'healthcare' as healthcare,
tags->'memorial' as memorial,
tags->'artwork_type' as artwork_type,
ref,
Expand All @@ -2335,6 +2356,7 @@ Layer:
OR tourism IN ('artwork', 'alpine_hut', 'hotel', 'motel', 'hostel', 'chalet', 'wilderness_hut', 'guest_house', 'apartment', 'camp_site', 'caravan_site', 'theme_park',
'museum', 'viewpoint', 'attraction', 'zoo', 'information', 'picnic_site', 'gallery')
OR amenity IS NOT NULL -- skip checking a huge list and use a null check
OR (tags->'healthcare') IS NOT NULL
OR tags->'advertising' IN ('column')
OR shop IS NOT NULL
OR (tags->'office') IS NOT NULL
Expand Down
24 changes: 5 additions & 19 deletions symbols/amenity/hospital.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.