Closed nvkelso closed 5 years ago
Can we use sort_key
for this?
For pois and places that could work.
But we already have sort_key
on features like roads and even some building and water features that that means z-stacking order. Because those features also need the new collision values we should probably be consistent everywhere.
Looking at Tangram this is called "priority" so I propose priority_key
(though maybe we should call them both sort_rank
and priority_rank
in keeping with scalerank
(or scale_rank
).
There's a ton of client side logic to set these for POIs layer in particular, moving into v1.7 milestone.
We can sorta use the sort_rank, except the landuse labels should (a) generally collide out the road labels / that can change by zoom and (b) we need to set them for places and pois layers, so let's do some research...
Generally the collision should be driven by min_zoom (or min_label) and then tie break with the relative ranking of the features.
@zerebubuth can you generate a CSV that has the following columns, filled out for all the kinds?
layer | kind | label_placement | min_zoom | sort_rank |
---|---|---|---|---|
water | water | true | 3.0 | 200 |
earth | cliff | true | 8.0 | 227 |
landuse | park | true | 15.0 | 156 |
buildings | address | true | 16.0 | 475 |
boundaries | region | null | 16.0 | 250 |
roads | highway | null | 16.0 | 444 |
transit | highway | null | 16.0 | 413 |
places | region | null | 10.0 | null |
pois | post_office | null | 16.0 | null |
Here's a CSV with all the kinds with their min_zoom
and sort_rank
. And a script to generate it in the future in #1771. I didn't add label_placement
yet, as the logic for that is a lot more complicated, and depends on whether the feature has a name, if it's also matched by filters in other layers, etc... Hopefully this is good enough to see where we need to focus our efforts.
A few notes on the data:
min_zoom
is zero. This generally means we've got an unconstrained area-based zoom. While this could theoretically lead to a feature at zoom 0, in practice none are that large. However, we probably ought to clamp
them to a more reasonable minimum.min_zoom
and sort_rank
might be off where they depend on things that aren't just the kind, i.e: layer
for roads, or geometry type for dams, etc...min_zoom
is None
. This means that the data comes from an external source (e.g: for WOF, it comes from the database) and this script isn't able to deduce what that value is. In general, I figure this is probably OK, since it means it's likely manually-curated anyway.LAYER | KIND | MIN_ZOOM | SORT_RANK |
---|---|---|---|
admin_areas | admin_area |
5 | None |
boundaries | aboriginal_lands |
8 | 250 |
boundaries | country |
0 | 262 |
boundaries | county |
10 | 254 |
boundaries | disputed |
0 | 261 |
boundaries | indefinite |
0 | 259 |
boundaries | indeterminate |
0 | 259 |
boundaries | lease_limit |
0 | 259 |
boundaries | line_of_control |
0 | 260 |
boundaries | locality |
11 | 252 |
boundaries | macroregion |
2 | 257 |
boundaries | map_unit |
5 | 258 |
boundaries | maritime |
8 | 250 |
boundaries | overlay_limit |
0 | 259 |
boundaries | region |
2 | 256 |
buildings | address |
17 | 475 |
buildings | building |
13 | 475 |
buildings | building_part |
15 | 475 |
buildings | entrance |
17 | 475 |
buildings | exit |
17 | 475 |
earth | archipelago |
15 | None |
earth | arete |
13 | 228 |
earth | cliff |
13 | 227 |
earth | continent |
1 | None |
earth | earth |
0 | 10 |
earth | island |
7 | None |
earth | islet |
15 | None |
earth | ridge |
13 | None |
earth | valley |
13 | None |
landuse | aerodrome |
8 | 74 |
landuse | airfield |
8 | 73 |
landuse | allotments |
12 | 103 |
landuse | amusement_ride |
9 | 119 |
landuse | animal |
9 | 114 |
landuse | apron |
9 | 77 |
landuse | aquarium |
10 | 61 |
landuse | artwork |
12 | 115 |
landuse | attraction |
12 | 116 |
landuse | aviary |
9 | 97 |
landuse | battlefield |
3 | 25 |
landuse | beach |
10 | 108 |
landuse | boatyard |
15 | 63 |
landuse | breakwater |
10 | 224 |
landuse | bridge |
10 | 229 |
landuse | camp_site |
13 | 105 |
landuse | caravan_site |
9 | 71 |
landuse | carousel |
9 | 117 |
landuse | cemetery |
10 | 91 |
landuse | cinema |
9 | 94 |
landuse | city_wall |
12 | 271 |
landuse | college |
8 | 43 |
landuse | commercial |
10 | 46 |
landuse | common |
12 | 82 |
landuse | container_terminal |
11 | 65 |
landuse | crane |
16 | 272 |
landuse | cutline |
10 | 226 |
landuse | cutting |
16 | 11 |
landuse | dam |
9 | 223 |
landuse | danger_area |
9 | 50 |
landuse | dike |
10 | 227 |
landuse | ditch |
16 | 11 |
landuse | dog_park |
9 | 110 |
landuse | embankment |
16 | 278 |
landuse | enclosure |
9 | 99 |
landuse | farm |
10 | 40 |
landuse | farmland |
10 | 41 |
landuse | fence |
16 | 269 |
landuse | ferry_terminal |
11 | 66 |
landuse | footway |
9 | 125 |
landuse | forest |
4 | 31 |
landuse | fort |
9 | 53 |
landuse | fuel |
9 | 93 |
landuse | garden |
12 | 109 |
landuse | gate |
16 | 11 |
landuse | generator |
10 | 104 |
landuse | glacier |
8 | 29 |
landuse | golf_course |
10 | 62 |
landuse | grass |
9 | 35 |
landuse | grave_yard |
13 | 11 |
landuse | groyne |
10 | 225 |
landuse | guard_rail |
16 | 11 |
landuse | hanami |
12 | 107 |
landuse | harbour |
11 | 11 |
landuse | hedge |
9 | 263 |
landuse | hospital |
10 | 60 |
landuse | industrial |
10 | 21 |
landuse | kerb |
16 | 11 |
landuse | land |
9 | 222 |
landuse | library |
9 | 95 |
landuse | maze |
10 | 106 |
landuse | meadow |
9 | 36 |
landuse | military |
8 | 48 |
landuse | mud |
9 | 219 |
landuse | national_park |
3 | 18 |
landuse | natural_forest |
6 | 33 |
landuse | natural_park |
9 | 32 |
landuse | natural_wood |
6 | 34 |
landuse | nature_reserve |
4 | 23 |
landuse | naval_base |
8 | 49 |
landuse | orchard |
10 | 11 |
landuse | park |
4 | 24 |
landuse | parking |
14 | 122 |
landuse | pedestrian |
12 | 111 |
landuse | petting_zoo |
9 | 98 |
landuse | picnic_site |
9 | 121 |
landuse | pier |
11 | 228 |
landuse | pitch |
12 | 113 |
landuse | place_of_worship |
12 | 90 |
landuse | plant |
10 | 102 |
landuse | plant_nursery |
10 | 11 |
landuse | playground |
12 | 112 |
landuse | port |
11 | 11 |
landuse | port_terminal |
11 | 67 |
landuse | power_line |
14 | 274 |
landuse | power_minor_line |
17 | 273 |
landuse | prison |
9 | 52 |
landuse | protected_area |
4 | 17 |
landuse | quarry |
9 | 89 |
landuse | quay |
16 | 69 |
landuse | railway |
10 | 88 |
landuse | range |
9 | 51 |
landuse | recreation_ground |
10 | 70 |
landuse | recreation_track |
9 | 72 |
landuse | residential |
4 | 20 |
landuse | resort |
10 | 58 |
landuse | rest_area |
11 | 44 |
landuse | retail |
10 | 47 |
landuse | retaining_wall |
15 | 266 |
landuse | rock |
9 | 27 |
landuse | roller_coaster |
9 | 100 |
landuse | runway |
9 | 78 |
landuse | rural |
4 | 14 |
landuse | school |
12 | 92 |
landuse | scree |
9 | 11 |
landuse | scrub |
9 | 37 |
landuse | service_area |
11 | 45 |
landuse | shipyard |
15 | 64 |
landuse | snow_fence |
15 | 267 |
landuse | sports_centre |
10 | 80 |
landuse | stadium |
10 | 79 |
landuse | stone |
9 | 28 |
landuse | substation |
10 | 86 |
landuse | summer_toboggan |
9 | 101 |
landuse | taxiway |
9 | 76 |
landuse | theatre |
9 | 96 |
landuse | theme_park |
10 | 54 |
landuse | tower |
10 | 124 |
landuse | trail_riding_station |
9 | 59 |
landuse | tree_row |
9 | 264 |
landuse | university |
8 | 42 |
landuse | urban |
4 | 13 |
landuse | urban_area |
4 | 11 |
landuse | village_green |
9 | 81 |
landuse | wall |
16 | 270 |
landuse | wastewater_plant |
10 | 83 |
landuse | water_park |
9 | 120 |
landuse | water_slide |
9 | 118 |
landuse | water_works |
10 | 84 |
landuse | wetland |
9 | 220 |
landuse | wharf |
16 | 68 |
landuse | wilderness_hut |
12 | 123 |
landuse | wildlife_park |
10 | 55 |
landuse | winery |
10 | 56 |
landuse | winter_sports |
10 | 39 |
landuse | wood |
6 | 30 |
landuse | works |
10 | 85 |
landuse | zoo |
10 | 57 |
places | borough |
None | None |
places | country |
1 | None |
places | locality |
2 | None |
places | macrohood |
None | None |
places | microhood |
None | None |
places | neighbourhood |
None | None |
places | region |
3 | None |
pois | accountant |
17 | None |
pois | adit |
16 | None |
pois | administrative |
17 | None |
pois | adult_gaming_centre |
14 | None |
pois | advertising_agency |
17 | None |
pois | aerodrome |
8 | None |
pois | aeroway_gate |
16 | None |
pois | airfield |
8 | None |
pois | airport |
8 | None |
pois | alcohol |
13 | None |
pois | allotments |
16 | None |
pois | alpine_hut |
13 | None |
pois | ambulatory_care |
17 | None |
pois | amusement_ride |
17 | None |
pois | animal |
17 | None |
pois | aquarium |
14 | None |
pois | archaeological_site |
16 | None |
pois | architect |
17 | None |
pois | art |
17 | None |
pois | arts_centre |
15 | None |
pois | artwork |
17 | None |
pois | association |
17 | None |
pois | atm |
18 | None |
pois | attraction |
17 | None |
pois | atv |
17 | None |
pois | aviary |
17 | None |
pois | baby_hatch |
17 | None |
pois | bakery |
17 | None |
pois | bank |
14 | None |
pois | bar |
15 | None |
pois | battlefield |
10 | None |
pois | bbq |
18 | None |
pois | beach |
10 | None |
pois | beach_resort |
14 | None |
pois | beacon |
15 | None |
pois | beauty |
17 | None |
pois | bed_and_breakfast |
17 | None |
pois | bench |
18 | None |
pois | bicycle |
15 | None |
pois | bicycle_junction |
16 | None |
pois | bicycle_parking |
17 | None |
pois | bicycle_rental |
16 | None |
pois | bicycle_rental_station |
17 | None |
pois | bicycle_repair_station |
18 | None |
pois | biergarten |
15 | None |
pois | block |
16 | None |
pois | blood |
17 | None |
pois | blood_bank |
17 | None |
pois | boat_lift |
16 | None |
pois | boat_rental |
16 | None |
pois | boat_storage |
17 | None |
pois | boatyard |
10 | None |
pois | bollard |
16 | None |
pois | bookmaker |
17 | None |
pois | books |
17 | None |
pois | border_control |
14 | None |
pois | brewery |
13 | None |
pois | bunker |
16 | None |
pois | bureau_de_change |
17 | None |
pois | bus_station |
16 | None |
pois | bus_stop |
18 | None |
pois | butcher |
17 | None |
pois | cafe |
15 | None |
pois | camera |
16 | None |
pois | camp_site |
13 | None |
pois | car |
17 | None |
pois | car_parts |
17 | None |
pois | car_rental |
16 | None |
pois | car_repair |
17 | None |
pois | car_sharing |
17 | None |
pois | car_wash |
17 | None |
pois | caravan_site |
14 | None |
pois | carousel |
17 | None |
pois | carpenter |
13 | None |
pois | casino |
10 | None |
pois | cattle_grid |
16 | None |
pois | cave_entrance |
15 | None |
pois | cemetery |
12 | None |
pois | chalet |
17 | None |
pois | charging_station |
17 | None |
pois | charity |
13 | None |
pois | chemist |
13 | None |
pois | childcare |
17 | None |
pois | chiropractor |
17 | None |
pois | cinema |
14 | None |
pois | clinic |
17 | None |
pois | clothes |
17 | None |
pois | coffee |
13 | None |
pois | college |
12 | None |
pois | communications_tower |
15 | None |
pois | community_centre |
13 | None |
pois | company |
17 | None |
pois | computer |
17 | None |
pois | confectionery |
13 | None |
pois | consulting |
17 | None |
pois | container_terminal |
10 | None |
pois | convenience |
17 | None |
pois | copyshop |
16 | None |
pois | cosmetics |
13 | None |
pois | courthouse |
14 | None |
pois | craft |
17 | None |
pois | crane |
16 | None |
pois | cross |
15 | None |
pois | customs |
14 | None |
pois | cycle_barrier |
18 | None |
pois | dam |
12 | None |
pois | danger_area |
8 | None |
pois | defibrillator |
17 | None |
pois | deli |
13 | None |
pois | dentist |
17 | None |
pois | department_store |
13 | None |
pois | dispensary |
17 | None |
pois | dive_centre |
16 | None |
pois | doctors |
17 | None |
pois | dog_park |
16 | None |
pois | doityourself |
13 | None |
pois | donation |
17 | None |
pois | dressmaker |
13 | None |
pois | drinking_water |
18 | None |
pois | dry_cleaning |
13 | None |
pois | dune |
15 | None |
pois | educational_institution |
17 | None |
pois | egress |
14 | None |
pois | electrician |
13 | None |
pois | electronics |
13 | None |
pois | elevator |
17 | None |
pois | embassy |
14 | None |
pois | emergency_phone |
17 | None |
pois | employment_agency |
17 | None |
pois | enclosure |
17 | None |
pois | estate_agent |
17 | None |
pois | farm |
15 | None |
pois | fashion |
17 | None |
pois | fast_food |
15 | None |
pois | ferry_terminal |
11 | None |
pois | field_hospital |
15 | None |
pois | financial |
17 | None |
pois | fire_hydrant |
18 | None |
pois | fire_station |
14 | None |
pois | firepit |
18 | None |
pois | fishing |
16 | None |
pois | fishing_area |
16 | None |
pois | fishmonger |
13 | None |
pois | fitness |
10 | None |
pois | fitness_station |
17 | None |
pois | florist |
17 | None |
pois | ford |
16 | None |
pois | forest |
7 | None |
pois | fort |
13 | None |
pois | foundation |
17 | None |
pois | fuel |
14 | None |
pois | funeral_directors |
16 | None |
pois | furniture |
13 | None |
pois | gallery |
15 | None |
pois | gambling |
17 | None |
pois | garden |
12 | None |
pois | garden_centre |
13 | None |
pois | gardener |
13 | None |
pois | gas_canister |
18 | None |
pois | gate |
14 | None |
pois | generator |
15 | None |
pois | geyser |
15 | None |
pois | gift |
17 | None |
pois | golf |
13 | None |
pois | golf_course |
12 | None |
pois | government |
17 | None |
pois | grave_yard |
13 | None |
pois | greengrocer |
17 | None |
pois | grocery |
17 | None |
pois | guest_house |
17 | None |
pois | hairdresser |
17 | None |
pois | halt |
16 | None |
pois | hanami |
17 | None |
pois | handicraft |
13 | None |
pois | harbourmaster |
16 | None |
pois | hardware |
13 | None |
pois | hazard |
15 | None |
pois | health_centre |
15 | None |
pois | healthcare_alternative |
17 | None |
pois | healthcare_centre |
17 | None |
pois | healthcare_laboratory |
17 | None |
pois | helipad |
16 | None |
pois | heliport |
8 | None |
pois | hifi |
17 | None |
pois | horse_riding |
10 | None |
pois | hospice |
17 | None |
pois | hospital |
10 | None |
pois | hostel |
17 | None |
pois | hot_spring |
16 | None |
pois | hotel |
13 | None |
pois | hunting |
16 | None |
pois | hunting_stand |
17 | None |
pois | hvac |
13 | None |
pois | ice_cream |
13 | None |
pois | industrial |
17 | None |
pois | information |
16 | None |
pois | insurance |
17 | None |
pois | it |
17 | None |
pois | jewelry |
17 | None |
pois | karaoke |
17 | None |
pois | karaoke_box |
17 | None |
pois | kindergarten |
13 | None |
pois | landmark |
12 | None |
pois | laundry |
13 | None |
pois | lawyer |
17 | None |
pois | level_crossing |
18 | None |
pois | library |
14 | None |
pois | life_ring |
18 | None |
pois | lifeguard_tower |
17 | None |
pois | lighthouse |
14 | None |
pois | lock |
15 | None |
pois | lottery |
17 | None |
pois | love_hotel |
18 | None |
pois | mall |
12 | None |
pois | marina |
12 | None |
pois | marketplace |
13 | None |
pois | mast |
17 | None |
pois | maze |
17 | None |
pois | memorial |
17 | None |
pois | metal_construction |
13 | None |
pois | midwife |
17 | None |
pois | midwife_occupational |
17 | None |
pois | military |
8 | None |
pois | mineshaft |
15 | None |
pois | mini_roundabout |
16 | None |
pois | miniature_golf |
16 | None |
pois | mobile_phone |
17 | None |
pois | money_transfer |
17 | None |
pois | monument |
15 | None |
pois | mooring |
17 | None |
pois | motel |
13 | None |
pois | motorcycle |
17 | None |
pois | motorcycle_parking |
17 | None |
pois | motorway_junction |
12 | None |
pois | museum |
12 | None |
pois | music |
13 | None |
pois | national_park |
3.5 | None |
pois | nature_reserve |
4 | None |
pois | naval_base |
8 | None |
pois | newsagent |
17 | None |
pois | newspaper |
17 | None |
pois | ngo |
17 | None |
pois | nightclub |
15 | None |
pois | notary |
17 | None |
pois | nursing_home |
15 | None |
pois | obelisk |
14 | None |
pois | observatory |
15 | None |
pois | office |
17 | None |
pois | offshore_platform |
13 | None |
pois | optician |
17 | None |
pois | optometrist_paediatrics |
17 | None |
pois | outdoor |
15 | None |
pois | painter |
13 | None |
pois | park |
8 | None |
pois | parking |
14 | None |
pois | parking_garage |
14 | None |
pois | peak |
9 | None |
pois | perfumery |
17 | None |
pois | pet |
13 | None |
pois | petroleum_well |
17 | None |
pois | petting_zoo |
17 | None |
pois | pharmacy |
13 | None |
pois | phone |
18 | None |
pois | photo |
16 | None |
pois | photographer |
13 | None |
pois | photographic_laboratory |
13 | None |
pois | physician |
17 | None |
pois | physiotherapist_physiotherapy |
17 | None |
pois | picnic_site |
16 | None |
pois | picnic_table |
18 | None |
pois | pitch |
16 | None |
pois | place_of_worship |
12 | None |
pois | plant |
12 | None |
pois | plaque |
16 | None |
pois | platform |
17 | None |
pois | playground |
17 | None |
pois | plumber |
13 | None |
pois | podiatrist_psychotherapist |
17 | None |
pois | police |
14 | None |
pois | political_party |
17 | None |
pois | port_terminal |
10 | None |
pois | post_box |
18 | None |
pois | post_office |
14 | None |
pois | pottery |
13 | None |
pois | power_pole |
18 | None |
pois | power_tower |
16 | None |
pois | power_wind |
15 | None |
pois | prison |
13 | None |
pois | protected_area |
7 | None |
pois | pub |
15 | None |
pois | put_in |
14 | None |
pois | put_in_egress |
14 | None |
pois | pylon |
17 | None |
pois | quarry |
12 | None |
pois | quay |
10 | None |
pois | range |
8 | None |
pois | ranger_station |
14 | None |
pois | rapid |
15 | None |
pois | recreation_ground |
12 | None |
pois | recreation_track |
16 | None |
pois | recycling |
16 | None |
pois | rehabilitation |
17 | None |
pois | religion |
17 | None |
pois | research |
17 | None |
pois | resort |
14 | None |
pois | rest_area |
11 | None |
pois | restaurant |
15 | None |
pois | rock |
17 | None |
pois | roller_coaster |
17 | None |
pois | ruins |
14 | None |
pois | saddle |
14 | None |
pois | sanitary_dump_station |
17 | None |
pois | sawmill |
13 | None |
pois | school |
13 | None |
pois | scuba_diving |
17 | None |
pois | service_area |
11 | None |
pois | shelter |
16 | None |
pois | ship_chandler |
17 | None |
pois | shipyard |
10 | None |
pois | shoemaker |
13 | None |
pois | shoes |
13 | None |
pois | shop |
17 | None |
pois | shower |
18 | None |
pois | sinkhole |
15 | None |
pois | ski |
13 | None |
pois | ski_rental |
13 | None |
pois | ski_school |
13 | None |
pois | slaughterhouse |
17 | None |
pois | slipway |
17 | None |
pois | snow_cannon |
13 | None |
pois | snowmobile |
17 | None |
pois | social_facility |
17 | None |
pois | speech |
17 | None |
pois | sports |
13 | None |
pois | sports_centre |
10 | None |
pois | spring |
14 | None |
pois | stadium |
10 | None |
pois | station |
10 | None |
pois | stationery |
17 | None |
pois | stone |
17 | None |
pois | stonemason |
13 | None |
pois | stop |
16 | None |
pois | stop_area |
15 | None |
pois | street_lamp |
18 | None |
pois | studio |
17 | None |
pois | substation |
14 | None |
pois | subway_entrance |
17 | None |
pois | summer_camp |
14 | None |
pois | summer_toboggan |
17 | None |
pois | supermarket |
13 | None |
pois | swimming_area |
16 | None |
pois | tailor |
13 | None |
pois | tax_advisor |
17 | None |
pois | taxi |
18 | None |
pois | telecommunication |
17 | None |
pois | telephone |
18 | None |
pois | telescope |
15 | None |
pois | theatre |
15 | None |
pois | theme_park |
13 | None |
pois | therapist |
17 | None |
pois | tobacco |
17 | None |
pois | toilets |
18 | None |
pois | toll_booth |
15 | None |
pois | townhall |
12 | None |
pois | toys |
13 | None |
pois | trade |
13 | None |
pois | traffic_signals |
18 | None |
pois | trail_riding_station |
17 | None |
pois | trailhead |
15 | None |
pois | tram_stop |
16 | None |
pois | travel_agency |
17 | None |
pois | travel_agent |
17 | None |
pois | tree |
16 | None |
pois | turning_circle |
17 | None |
pois | turning_loop |
17 | None |
pois | tyres |
16 | None |
pois | university |
10 | None |
pois | variety_store |
13 | None |
pois | veterinary |
13 | None |
pois | viewpoint |
15 | None |
pois | volcano |
9 | None |
pois | walking_junction |
16 | None |
pois | waste_basket |
18 | None |
pois | waste_disposal |
18 | None |
pois | wastewater_plant |
12 | None |
pois | water_park |
13 | None |
pois | water_point |
18 | None |
pois | water_slide |
17 | None |
pois | water_tower |
15 | None |
pois | water_well |
17 | None |
pois | water_works |
12 | None |
pois | waterfall |
12 | None |
pois | watering_place |
18 | None |
pois | watermill |
14 | None |
pois | waterway_fuel |
13 | None |
pois | wayside_cross |
16 | None |
pois | wharf |
10 | None |
pois | wilderness_hut |
15 | None |
pois | wildlife_park |
17 | None |
pois | windmill |
14 | None |
pois | wine |
13 | None |
pois | winery |
13 | None |
pois | winter_sports |
10 | None |
pois | wood |
9 | None |
pois | works |
12 | None |
pois | zoo |
10 | None |
roads | aerialway |
12 | 355 |
roads | aeroway |
9 | 355 |
roads | ferry |
None | 355 |
roads | highway |
5 | 355 |
roads | major_road |
5 | 355 |
roads | minor_road |
5 | 355 |
roads | path |
8 | 354 |
roads | piste |
13 | 354 |
roads | portage_way |
8 | 354 |
roads | racetrack |
14 | 355 |
roads | rail |
11 | 355 |
transit | bus_stop |
17 | 275 |
transit | funicular |
12 | 416 |
transit | halt |
13 | 275 |
transit | light_rail |
9 | 418 |
transit | monorail |
12 | 415 |
transit | platform |
15 | 385 |
transit | station |
15 | 275 |
transit | stop |
13 | 275 |
transit | stop_area |
15 | 275 |
transit | subway |
8 | 275 |
transit | train |
5 | 275 |
transit | tram |
9 | 417 |
transit | tram_stop |
13 | 275 |
water | basin |
1.066 | 200 |
water | bay |
1.066 | 200 |
water | canal |
9 | 201 |
water | ditch |
16 | 201 |
water | dock |
1.066 | 200 |
water | drain |
16 | 201 |
water | fjord |
1.066 | 200 |
water | fountain |
1.066 | 200 |
water | lake |
None | 204 |
water | ocean |
None | 200 |
water | playa |
None | 203 |
water | reef |
1.066 | 200 |
water | river |
9 | 201 |
water | riverbank |
7 | 204 |
water | sea |
3 | 200 |
water | strait |
1.066 | 200 |
water | stream |
11 | 201 |
water | swimming_pool |
7 | 206 |
water | water |
7 | 204 |
@zerebubuth how should we arrange the collision_rank
CSV values? Should it reuse the existing CSV with new column added, or be new CSV? The bonus of reusing the existing CSV is it'll also reuse the existing matching logic?
@bcamper How should collision rank work for road text labels versus road shields? Should they each get their own slot? Technically they are the same data feature... so I could do a spacing trick where the shield is the data value - 1, and the text label is just the data value, so the shield would win in collision over the text? But then repeat groups get involved and that confuses me.
I want the collision to be the tie breaker in the code if 2 features have the same min_zoom... so major roads would naturally collide out minor roads because of their feature min_zoom, but different minor_roads could have the same min_zoom, but different collision ranks (with smaller values winning).
This is also the case for many POIs which all share the same min_zoom (there are a ton of zoom 16 and zoom 17 kinds, but some are more/less important than others in the same min_zoom grouping).
@zerebubuth Can you expand the CSV generation to include kind_detail
, please?
Rough draft 1 (see collision_rank
column):
Doesn't include:
kind_detail
(across all layers)@nvkelso for shields vs. road labels, it looks like we have (generally speaking) set the shield priority
to be just below the road label in Bubble Wrap. While it might not be a problem if they had the same value, I think we'd likely lose some shields if made them the same priority (because we are using placement: midpoint
for shields, placing one at the mid-point of every line segment, so there are fewer of them to go around than road labels, but it's also efficient to place shields that way). So, I think your idea of doubling the numbers and offsetting them by one is probably the best to ensure we are baking in more explicit control.
I don't think the interaction of repeat groups matters here. Even aside from the outcome of https://github.com/tangrams/tangram/pull/687, they only thin out repetitions of the same exact text strings, and we are not generally placing road labels and shield text with the exact same text anyway (e.g. "Gowanus Expressway" for road label vs. "278" for shield).
It sounds like what you want is multi-level priority based on multiple props (min_zoom
and sort_rank
)? To achieve that, we could have a single compound value that reflects them together, calculated on the server-side. One way to do that is to multiply the min_zoom
component like:
collision_rank = min_zoom * 1000 + sort_rank
But that could have undesirable effects in creating a wide range of discontinuous priority
values that you need to understand when layering other features around them. Another way could be to put the sort_rank
tie-breaker in the fractional component of priority
(the Tangram docs say priority
should be an integer, but as far as I can see, I don't think there is an actual reason that fractional values won't or couldn't work -- would need to look at this in ES though), e.g.:
collision_rank = min_zoom + (1 - 1/sort_rank)
This will give you values like 10.975
for farm
(sort_rank
40) and 10.989
for cemetery
(sort_rank
91). That may be easier to reason about if you are placing other feature priorities around them (e.g. especially if layering in user-provided data). (This assumes all min_zoom
values are integers.)
Another approach would be to add some client-side support for compound/multi-prop priority keys, like priority: [min_zoom, sort_rank]
. I think that's interesting and probably not too difficult to add, but would have some additional processing overhead, so with performance as a goal, I'd lean towards a one-time server-side calc as the first option.
@nvkelso ah I see your gist with sample values now... you can totally just hand-code them like that too and still get a reasonable (?) range of integers. I just assumed you wanted something more automated (I guess you could still automate that by sorting and using the list index), but that may be simplest.
Of the options presented, this is most in line with the behavior I'm looking for (updated):
priority = feature.properties.min_zoom + (1 - 1 / feature.properties.collision_rank) * 0.1
Updating @bcamper's explanation:
Smaller numbers win. A feature with a smaller collision order should win, assuming same min_zoom.
Assuming both farm and cemetery are min_zoom
10: This will give you values like 10.975 for farm (collision_rank
: 40) and 10.989 for cemetery (collision_rank
: 91). That may be easier to reason about if you are placing other feature priorities around them (e.g. especially if layering in user-provided data). (This assumes all min_zoom values are integers.)
But I think the min_zoom
should be assumed to be a float with only a tenth precision, like 10.0, 10.1, and 10.2 but 10.01 would not be a valid min_zoom. This is important so in dense areas features with the same kind can have different importance (either by area or other data or curation logic).
min_zoom | collision_rank | collision | min_zoom_alt |
---|---|---|---|
10.0 | 40 | 10.0975 | 10.00040 |
10.0 | 91 | 10.0989010989 | 10.00091 |
10.1 | 40 | 10.1975 | 11.00040 |
10.1 | 91 | 10.1989130435 | 10.10091 |
NOTES:
collision_rank
value into the min_zoom
value directly? Seems worth while to have the collision_rank as a CSV and then do that math as a final tile processing step? @zerebubuth will have feedback on if/how those floats would impact tile size/encoding, and/or other ideas (as might @matteblair)
We already have a mix of ints and floats min_zoom
in vector tiles, but yes @zerebubuth please comment!
@matteblair for Tangram ES support of float priority text collision values.
In general, I'd prefer not to bake anything which is easily computable into tiles, especially if it's combinatoric and the values are likely distinct. If I'm understanding correctly, then we'd be starting with something like this:
Feature ID | min_zoom |
collision_rank |
---|---|---|
1 | 10 | 40 |
2 | 10 | 91 |
3 | 10 | 50 |
4 | 11 | 40 |
5 | 11 | 91 |
6 | 11 | 50 |
For which these properties are going to take up something like 22 bytes (not including the key overhead). And we're extending that to:
Feature ID | min_zoom |
collision_rank |
collision |
---|---|---|---|
1 | 10 | 40 | 10.0975 |
2 | 10 | 91 | 10.09890109890109890109 |
3 | 10 | 50 | 10.098 |
4 | 11 | 40 | 11.0975 |
5 | 11 | 91 | 11.09890109890109890109 |
6 | 11 | 50 | 11.098 |
For which we're adding about 36 bytes, as each collision
value is unique - an increase of 160% just for 6 features. It'll get bigger the more combinations we're expanding and inlining. It'll be worst in POI-dense areas, ironically where we most need the collision rank.
This is just static data, easily computable from other properties (layer
, kind
, kind_detail
, sort_rank
) in the tile. We're not adding any new information by including this in the tile, just increasing the tile size.
And by baking our style choices into the tiles, we lose flexibility on the client; anyone who wants to change the computed values will be faced with the choice between using our suboptimal baked-in values or taking a performance hit by patching or overriding them in the style file. For example, I could see Walkabout wanting to bump the priority of cycle-related POIs and de-emphasise motor vehicle POIs.
@bcamper is there some way in Tangram to attach a function to the tile decoding that could be called with the layer and feature properties object, to return a modified properties object? Would doing this once at tile load, rather than in the styling step, be "cheaper" than using function: ...
stuff in the style rules themselves?
I'm fine starting with adding a new collision_rank
property and doing the data merge client side.
My understanding is Tangram JS can do the tile decoding function, but that Tangram ES cannot (as of today).
Let's go ahead and prototype with the JS function approach.
We also discussed IRL about reusing CSV converting to YAML approach for this. That could make diffs much easier to read :)
I've added Gist documenting existing Bubble Wrap practice around priority
:
Take aways:
priority
, but we can enable it without too much trouble.collision_rank
ever used by the client? It seems like only the final collision
value is used, in which case we would only need to add the collision
property to the tiles, not both.collision
values could be scaled to integers to take advantage of varint encoding.priority
idea is not bad. It would be more efficient for Tangram ES than performing the same logic in a JS function. My understanding is that a syntax like priority: ['min_zoom', 'sort_rank']
would mean that first min_zoom
is compared and then each subsequent property name is used as a tiebreaker, which sounds like the desired end result. Of course, using a pre-computed data value is still more efficient for the client ;)
- Tangram ES does not currently allow non-integer values for priority, but we can enable it without too much trouble.
I've filed https://github.com/tangrams/tangram/issues/692 on Tangram JS. Depending on the implementation, let's also file and related a Tangram ES issue.
- @nvkelso not sure what you mean with "Tangram JS can do the tile decoding function, but that Tangram ES cannot". Tangram ES can access feature properties in JS functions the same as Tangram JS.
Does Tangram ES support the source scripts
, though? Reading the docs:
These scripts will be loaded before the data is processed so that they are available to the transform function.
scripts: [ 'https://url.com/js/script.js', 'local_script.js']
- The multi-key priority idea is not bad. It would be more efficient for Tangram ES than performing the same logic in a JS function. My understanding is that a syntax like priority: ['min_zoom', 'sort_rank'] would mean that first min_zoom is compared and then each subsequent property name is used as a tiebreaker, which sounds like the desired end result. Of course, using a pre-computed data value is still more efficient for the client ;)
With the name and other properties we treat the list as a series of fallbacks, not tie breakers. I think it's fine to be different, but let's talk about it more. What about using nesting to emphasize fallback versus tie breaker? If one of the properties isn't found will it evaluate to 0? That has the disadvantage of colliding out every other value with a valid return value...
priority: [min_zoom, collision_rank] # fallback? priority: [[min_zoom, collision_rank]] # nested tie breaker?
Does Tangram ES support the source scripts, though? Reading the docs:
Nopes ES does not support these.
population_rank from WOF, which roughly lines up with Bubble Wrap (but let's base on WOF instead, which is loosely based on NE):
18: Over 1b
17: 100m to 1b
16: 50m to 100m
15: 20m to 50m
14: 10m to 20m
13: 5m to 10m
12: 1m to 5m
11: 500k to 1m
10: 200k to 500k
9: 100k to 200k
8: 50k to 100k
7: 20k to 50k
6: 10k to 20k
5: 5k to 10k
4: 2k to 5k
3: 1k to 2k
2: 200 to 1k
1: Less than 200
0: Locale (no population) / places that only are visible at 50k scale or larger (but not neighbourhoods)
Needs to account for other top level placetypes as well, like macroregion
, region
, macrocounty
, county
, and localadmin
.
Needs to account for country_capital
and region_capital
. relative priority, too (20 slots each per placetype).
Yeah ES doesn't use the scripts
property, but I'm not sure how that would be used here.
The multi-key priority
could still be thought of like "fallbacks": When you're colliding two labels you start by comparing the first item, then if they're equal you fall back to the next item. There are definitely some subtleties to work out though, like properties that are absent from features. And the more I think about it, the harder this seems to implement efficiently. Consider that if we're colliding features whose priority depends on N properties, we may need to access and compare 2N properties for each collision, versus accessing those properties just N times per feature to get a "calculated" priority. The comparison isn't as clearly favorable as I first thought.
JS supports a function for priority
, does ES also?
I would start with that, and benchmark any performance issues before deciding to add multi-key syntax. Since there aren't that many POI features, it may not be an issue and it's a way to get this working now.
On Thu, Jan 10, 2019 at 6:21 PM Matt Blair notifications@github.com wrote:
Yeah ES doesn't use the scripts property, but I'm not sure how that would be used here.
The multi-key priority could still be thought of like "fallbacks": When you're colliding two labels you start by comparing the first item, then if they're equal you fall back to the next item. There are definitely some subtleties to work out though, like properties that are absent from features. And the more I think about it, the harder this seems to implement efficiently. Consider that if we're colliding features whose priority depends on N properties, we may need to access and compare 2N properties for each collision, versus accessing those properties just N times per feature to get a "calculated" priority. The comparison isn't as clearly favorable as I first thought.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/tilezen/vector-datasource/issues/988#issuecomment-453297479, or mute the thread https://github.com/notifications/unsubscribe-auth/AABBXQgpsz-BcC5xqdCR1ZDr_0t3zg2Zks5vB8rwgaJpZM4JsNQZ .
Yes ES does support functions for priority
style parameter. (https://github.com/tangrams/tangram-es/blob/6a8333b859f68ebb6e2286132d4436cbf157265c/core/src/scene/styleContext.cpp#L329)
Yeah ES doesn't use the scripts property, but I'm not sure how that would be used here.
If I am not mistaken this is useful for one time evaluation of properties at tile load time, instead of style building time per feature. (Referring to @zerebubuth's comment above)
Right, it's another way of achieving the same thing. Using a function for
priority
is more inline with our usual pattern for this case anyway
though (vs. one time tile load modifications, which are useful for more
significant transformation of features, or synthesizing entirely new
features, etc.).
On Thu, Jan 10, 2019 at 8:17 PM Varun notifications@github.com wrote:
Yeah ES doesn't use the scripts property, but I'm not sure how that would be used here.
If I am not mistaken this is useful for one time evaluation of properties at tile load time, instead of style building time per feature. (Referring to @zerebubuth https://github.com/zerebubuth's comment above)
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/tilezen/vector-datasource/issues/988#issuecomment-453330622, or mute the thread https://github.com/notifications/unsubscribe-auth/AABBXRDBi23bKnSGusQltLsHouU9HXneks5vB-YIgaJpZM4JsNQZ .
- Leave room at lower end for ux and ui labels (like routing)
Done (left 100)
- Leave room at lower end for "house" overlays like transit and bicycle.
Done (left 100)
- Leave room at lower end for custom data overlays (100 or 1000 slots)
Done (left 100)
- Probably leave some room in between "classes" or "basemap layers" of data for custom interlays?
Skip... someone should control this with their own combo of min_zoom and probably setting collision order to value in the data overlay
range so it always wins against other features in that min_zoom.
- Population_rank for countries, localities, and other "places" layer features are another dimension
Left space for this... needs population_rank logic.
- Long shield text shields get demoted
Left space for this... needs shield logic.
Some shield texts of certain high profile network values get promoted – we already have some of that logic in the network setting code – try to reuse / generalize to say 5 levels? Left space for this... needs shield logic.
POIs that have area are boosted over point versions.
Skipped, the min_zoom already encodes this (and when it doesn't the min_zoom should be updated)
- Landuse layer only labels are demoted.
Generally implemented.
- Neighbourhood priority changes with zoom
Skipped, the min_zoom already carries this.
- Road priority should also probably change with zoom (like we do for sort_rank)
priority = feature.properties.min_zoom + (1 - 1 / feature.properties.collision_rank) * 0.1
kind_detail: [motorway, trunk, primary, secondary, tertiary]
, and are prioritized in that order.
priority = 6 + (1 - 1 / feature.properties.collision_rank) * 0.1
priority = 11 + (1 - 1 / feature.properties.collision_rank) * 0.1
priority = 12 + (1 - 1 / feature.properties.collision_rank) * 0.1
priority = 16 + (1 - 1 / feature.properties.collision_rank) * 0.1
I've taken the order I had before, added kind_detail, and explained some of the * gap
suggestions.
locality
and some other placetypes I've left space in for collision orders based on population_rank
, which is a new feature we need to add both reading population values, and infering from the locality's kind_detail _ala _default_min_zoom_for_place_kind()
for values city, farm, hamlet, isolated_dwelling, locality, scientific_station, town, village.kind_detail
, but mostly just for roads and transit layers.kind_detail
orders until we get to it, always with a little room for growth._(The following table is from all_the_kinds_simplified.csv.zip, which is from the bigger all_the_kinds.csv.zip which also includes the min_zoom and minlabel).
$layer | kind | kind_detail | collision_rank | comment |
---|---|---|---|---|
99 gap | reserved for UX/UI | |||
100 gap | reserved for house theme overlays | |||
100 gap | reserved for data overlays | |||
earth | continent | 1 | ||
water | ocean | 2 | ||
places | country | 3 | ||
19 gap | reserved for population_rank | |||
places | locality | 4 | ||
19 gap | reserved for population_rank; guess the pop from kind_detail ala _default_min_zoom_for_place_kind() : city, farm, hamlet, isolated_dwelling, locality, scientific_station, town, village, | |||
pois | national_park | 5 | ||
places | region | 6 | ||
19 gap | reserved for population_rank | |||
water | sea | 7 | ||
pois | nature_reserve | 8 | ||
water | lake | 9 | ||
10 gap | for shields & etc | |||
roads | highway | motorway | 10 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | highway | motorway_link | 10 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | highway | trunk | 10 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | highway | 10 | inserted | |
10 gap | for shields & etc | |||
pois | forest | 11 | ||
earth | island | 12 | ||
water | water | 13 | ||
pois | protected_area | 14 | ||
water | bay | 15 | ||
water | fjord | 16 | ||
water | strait | 17 | ||
water | playa | 18 | ||
pois | aerodrome | 19 | ||
pois | military | 20 | ||
pois | naval_base | 21 | ||
pois | airport | 22 | ||
pois | airfield | 23 | ||
pois | park | 24 | ||
pois | volcano | 25 | ||
pois | wood | 26 | ||
10 gap | reserve for kind_details | |||
pois | peak | 27 | ||
water | river | 28 | ||
10 gap | for shields & etc | |||
transit | train | 29 | can flip per map style | |
10 gap | for shields & etc | |||
pois | beach | 30 | ||
10 gap | reserve for kind_details | |||
pois | university | 31 | ||
pois | battlefield | 32 | ||
10 gap | for shields & etc | |||
roads | major_road | primary | 33 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | major_road | primary_link | 33 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | major_road | secondary | 33 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | major_road | secondary_link | 33 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | major_road | tertiary | 33 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | major_road | tertiary_link | 33 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | major_road | trunk | 33 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | major_road | trunk_link | 33 | inserted |
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | major_road | 33 | inserted | |
10 gap | for shields & etc | |||
water | reef | 34 | ||
10 gap | reserve for kind_details | |||
water | canal | 35 | ||
earth | archipelago | 36 | ||
pois | ferry_terminal | 37 | ||
pois | rest_area | 38 | ||
pois | service_area | 39 | ||
pois | stadium | 40 | ||
pois | station | 41 | ||
pois | zoo | 42 | ||
10 gap | for shields & etc | |||
transit | subway | 43 | can flip per map style | |
10 gap | for shields & etc | |||
boundaries | aboriginal_lands | 44 | ||
20 gap | reserve for kind_details | |||
boundaries | county | 45 | ||
boundaries | region | 46 | ||
boundaries | macroregion | 47 | ||
boundaries | map_unit | 48 | ||
boundaries | indefinite | 49 | ||
boundaries | indeterminate | 50 | ||
boundaries | lease_limit | 51 | ||
boundaries | overlay_limit | 52 | ||
boundaries | line_of_control | 53 | ||
boundaries | disputed | 54 | ||
boundaries | country | 55 | ||
pois | college | 56 | ||
pois | hospital | 57 | ||
20 gap | reserve for kind_details | |||
pois | landmark | 58 | ||
pois | mall | 59 | ||
pois | museum | 60 | ||
pois | winter_sports | 61 | ||
pois | casino | 62 | ||
pois | golf_course | 63 | ||
pois | marina | 64 | ||
pois | sports_centre | 65 | ||
pois | garden | 66 | ||
pois | recreation_ground | 67 | ||
pois | waterfall | 68 | ||
10 gap | for shields & etc | |||
roads | ferry | 69 | ||
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
transit | light_rail | 70 | ||
10 gap | for shields & etc | |||
pois | townhall | 71 | ||
10 gap | for shields & etc | |||
transit | tram | 72 | ||
10 gap | for shields & etc | |||
pois | cemetery | 73 | ||
50 gap | reserve for kind_details | |||
pois | dam | 74 | ||
pois | motorway_junction | 75 | can flip per map style | |
pois | place_of_worship | 76 | ||
pois | plant | 77 | ||
pois | port_terminal | 78 | ||
pois | quarry | 79 | ||
pois | wastewater_plant | 80 | ||
pois | water_works | 81 | ||
pois | works | 82 | ||
places | borough | 83 | ||
50 gap | for shields, kind_detail & etc | |||
roads | path | 84 | ||
50 gap | for shields, kind_detail & etc | |||
pois | camp_site | 85 | ||
pois | chemist | 86 | ||
pois | community_centre | 87 | ||
pois | cosmetics | 88 | ||
pois | danger_area | 89 | ||
pois | department_store | 90 | ||
pois | doityourself | 91 | ||
pois | fort | 92 | ||
pois | garden_centre | 93 | ||
pois | golf | 94 | ||
pois | grave_yard | 95 | ||
50 gap | reserve for kind_details | |||
pois | hotel | 96 | ||
pois | marketplace | 97 | ||
pois | motel | 98 | ||
pois | music | 99 | ||
pois | pet | 100 | ||
pois | pharmacy | 101 | ||
20 gap | reserve for kind_details | |||
pois | range | 102 | ||
pois | school | 103 | ||
pois | shoes | 104 | ||
pois | ski | 105 | ||
pois | supermarket | 106 | ||
pois | theme_park | 107 | ||
pois | toys | 108 | ||
pois | variety_store | 109 | ||
pois | water_park | 110 | ||
pois | winery | 111 | ||
pois | alcohol | 112 | ||
pois | alpine_hut | 113 | ||
pois | brewery | 114 | ||
pois | charity | 115 | ||
pois | coffee | 116 | ||
pois | confectionery | 117 | ||
pois | deli | 118 | ||
pois | electronics | 119 | ||
pois | furniture | 120 | ||
pois | hardware | 121 | ||
pois | ice_cream | 122 | ||
pois | kindergarten | 123 | ||
pois | wine | 124 | ||
pois | gardener | 125 | ||
pois | sports | 126 | ||
earth | valley | 127 | ||
boundaries | locality | 128 | ||
pois | handicraft | 129 | ||
pois | ski_school | 130 | ||
pois | veterinary | 131 | ||
20 gap | reserve for kind_details | |||
10 gap | for shields & etc | |||
roads | portage_way | 132 | ||
10 gap | for shields & etc | |||
pois | dressmaker | 133 | ||
pois | dry_cleaning | 134 | ||
pois | fishmonger | 135 | ||
pois | laundry | 136 | ||
pois | prison | 137 | ||
water | dock | 138 | ||
pois | container_terminal | 139 | ||
pois | electrician | 140 | ||
pois | hvac | 141 | ||
pois | metal_construction | 142 | ||
pois | offshore_platform | 143 | ||
pois | painter | 144 | ||
pois | photographer | 145 | ||
pois | photographic_laboratory | 146 | ||
pois | plumber | 147 | ||
pois | pottery | 148 | ||
pois | sawmill | 149 | ||
pois | shoemaker | 150 | ||
pois | ski_rental | 151 | ||
pois | stonemason | 152 | ||
pois | tailor | 153 | ||
pois | trade | 154 | ||
pois | waterway_fuel | 155 | ||
pois | carpenter | 156 | ||
places | macrohood | 157 | ||
pois | aquarium | 158 | ||
pois | bank | 159 | ||
pois | beach_resort | 160 | ||
pois | caravan_site | 161 | ||
pois | cinema | 162 | ||
pois | fuel | 163 | ||
pois | library | 164 | ||
pois | resort | 165 | ||
pois | summer_camp | 166 | ||
landuse | ferry_terminal | 167 | ||
landuse | aerodrome | 168 | ||
pois | fire_station | 169 | ||
pois | ranger_station | 170 | ||
pois | fitness | 171 | ||
pois | embassy | 172 | ||
water | basin | 173 | ||
water | stream | 174 | ||
roads | 50 gap | for shields & etc | ||
roads | piste | 175 | ||
roads | 50 gap | for shields & etc | ||
roads | 50 gap | for shields, kind_detail & etc | ||
roads | aerialway | 176 | ||
roads | 50 gap | for shields, kind_detail & etc | ||
roads | 10 gap | for shields & etc | ||
roads | aeroway | runway | 177 | inserted |
roads | 10 gap | for shields & etc | ||
roads | 10 gap | for shields & etc | ||
roads | aeroway | taxiway | 177 | inserted |
roads | 10 gap | for shields & etc | ||
roads | 10 gap | for shields & etc | ||
roads | aeroway | 177 | ||
roads | 10 gap | for shields & etc | ||
pois | courthouse | 178 | ||
pois | lighthouse | 179 | ||
pois | obelisk | 180 | ||
10 gap | reserve for kind_details | |||
pois | police | 181 | ||
pois | post_office | 182 | ||
pois | ruins | 183 | ||
10 gap | reserve for kind_details | |||
pois | watermill | 184 | ||
pois | windmill | 185 | ||
places | neighbourhood | 186 | sometimes flips with zoom | |
pois | border_control | 187 | ||
pois | customs | 188 | ||
earth | ridge | 189 | ||
pois | boatyard | 190 | ||
pois | shipyard | 191 | ||
pois | spring | 192 | ||
pois | substation | 193 | ||
pois | gate | 194 | ||
10 gap | reserve for kind_details | |||
pois | horse_riding | 195 | ||
pois | wharf | 196 | ||
pois | adult_gaming_centre | 197 | ||
pois | egress | 198 | ||
pois | parking | 199 | ||
pois | parking_garage | 200 | ||
pois | put_in | 201 | ||
pois | put_in_egress | 202 | ||
pois | quay | 203 | ||
pois | saddle | 204 | ||
pois | arts_centre | 205 | ||
pois | bar | 206 | ||
100 gap | reserve for kind_details | |||
pois | bicycle | 207 | ||
pois | biergarten | 208 | ||
100 gap | reserve for kind_details | |||
pois | cafe | 209 | ||
100 gap | reserve for kind_details | |||
pois | fast_food | 210 | ||
100 gap | reserve for kind_details | |||
pois | field_hospital | 211 | ||
20 gap | reserve for kind_details | |||
pois | gallery | 212 | ||
pois | health_centre | 213 | ||
20 gap | reserve for kind_details | |||
pois | nightclub | 214 | ||
100 gap | reserve for kind_details | |||
pois | observatory | 215 | ||
pois | outdoor | 216 | ||
pois | pub | 217 | ||
100 gap | reserve for kind_details | |||
pois | restaurant | 218 | ||
100 gap | reserve for kind_details | |||
pois | theatre | 219 | ||
pois | toll_booth | 220 | ||
pois | trailhead | 221 | ||
pois | viewpoint | 222 | ||
pois | water_tower | 223 | ||
pois | wilderness_hut | 224 | ||
pois | nursing_home | 225 | ||
20 gap | reserve for kind_details | |||
pois | telescope | 226 | ||
landuse | city_wall | 227 | ||
water | riverbank | 228 | ||
earth | cliff | 229 | ||
earth | arete | 230 | ||
boundaries | maritime | 231 | ||
10 gap | for shields & etc | |||
roads | minor_road | unclassified | ||
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | minor_road | living_street | ||
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | minor_road | residential | ||
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | minor_road | road | ||
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | minor_road | service | ||
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | minor_road | raceway | ||
10 gap | for shields & etc | |||
10 gap | for shields & etc | |||
roads | minor_road | 232 | ||
10 gap | for shields & etc | |||
50 gap | for shields & etc | |||
roads | racetrack | 233 | ||
50 gap | for shields & etc | |||
20 gap | for shields & etc | |||
roads | rail | 234 | ||
20 gap | for shields & etc | |||
10 gap | for shields & etc | |||
transit | monorail | 235 | ||
10 gap | for shields & etc | |||
transit | funicular | 236 | ||
10 gap | for shields & etc | |||
pois | beacon | 237 | ||
pois | cave_entrance | 238 | ||
pois | communications_tower | 239 | ||
pois | cross | 240 | ||
pois | dune | 241 | ||
pois | farm | 242 | ||
pois | generator | 243 | ||
20 gap | reserve for kind_details | |||
pois | geyser | 244 | ||
pois | hazard | 245 | ||
pois | lock | 246 | ||
pois | mineshaft | 247 | ||
pois | monument | 248 | ||
pois | power_wind | 249 | ||
pois | rapid | 250 | ||
pois | sinkhole | 251 | ||
landuse | cutting | 252 | ||
landuse | ditch | 253 | ||
landuse | gate | 254 | ||
landuse | grave_yard | 255 | ||
50 gap | reserve for kind_details | |||
landuse | guard_rail | 256 | ||
landuse | harbour | 257 | ||
landuse | kerb | 258 | ||
landuse | orchard | 259 | ||
50 gap | reserve for kind_details | |||
landuse | plant_nursery | 260 | ||
landuse | port | 261 | ||
landuse | scree | 262 | ||
landuse | urban_area | 263 | ||
landuse | urban | 264 | ||
landuse | rural | 265 | ||
landuse | protected_area | 266 | ||
landuse | national_park | 267 | ||
landuse | residential | 268 | ||
landuse | industrial | 269 | ||
landuse | nature_reserve | 270 | ||
landuse | park | 271 | ||
landuse | battlefield | 272 | ||
landuse | rock | 273 | ||
landuse | stone | 274 | ||
landuse | glacier | 275 | ||
landuse | wood | 276 | ||
landuse | forest | 277 | ||
10 gap | reserve for kind_details | |||
landuse | natural_park | 278 | ||
10 gap | reserve for kind_details | |||
landuse | natural_forest | 279 | ||
10 gap | reserve for kind_details | |||
landuse | natural_wood | 280 | ||
10 gap | reserve for kind_details | |||
landuse | grass | 281 | ||
landuse | meadow | 282 | ||
landuse | scrub | 283 | ||
landuse | winter_sports | 284 | ||
landuse | farm | 285 | ||
landuse | farmland | 286 | ||
landuse | university | 287 | ||
landuse | college | 288 | ||
landuse | rest_area | 289 | ||
landuse | service_area | 290 | ||
landuse | commercial | 291 | ||
landuse | retail | 292 | ||
landuse | military | 293 | ||
landuse | naval_base | 294 | ||
landuse | danger_area | 295 | ||
landuse | range | 296 | ||
landuse | prison | 297 | ||
landuse | fort | 298 | ||
landuse | theme_park | 299 | ||
landuse | wildlife_park | 300 | ||
landuse | winery | 301 | ||
landuse | zoo | 302 | ||
landuse | resort | 303 | ||
landuse | trail_riding_station | 304 | ||
landuse | hospital | 305 | ||
landuse | aquarium | 306 | ||
landuse | golf_course | 307 | ||
landuse | boatyard | 308 | ||
landuse | shipyard | 309 | ||
landuse | container_terminal | 310 | ||
landuse | port_terminal | 311 | ||
landuse | wharf | 312 | ||
landuse | quay | 313 | ||
landuse | recreation_ground | 314 | ||
landuse | caravan_site | 315 | ||
landuse | recreation_track | 316 | ||
landuse | airfield | 317 | ||
landuse | stadium | 318 | ||
landuse | sports_centre | 319 | ||
landuse | village_green | 320 | ||
landuse | common | 321 | ||
landuse | railway | 322 | ||
landuse | quarry | 323 | ||
landuse | place_of_worship | 324 | ||
landuse | cemetery | 325 | ||
50 gap | reserve for kind_details | |||
landuse | school | 326 | ||
landuse | fuel | 327 | ||
landuse | cinema | 328 | ||
landuse | library | 329 | ||
landuse | theatre | 330 | ||
landuse | aviary | 331 | ||
landuse | petting_zoo | 332 | ||
landuse | camp_site | 333 | ||
landuse | beach | 334 | ||
10 gap | reserve for kind_details | |||
landuse | garden | 335 | ||
landuse | dog_park | 336 | ||
landuse | pedestrian | 337 | ||
landuse | playground | 338 | ||
landuse | attraction | 339 | ||
landuse | water_park | 340 | ||
landuse | wilderness_hut | 341 | ||
landuse | tower | 342 | ||
landuse | footway | 343 | ||
landuse | mud | 344 | ||
pois | wetland | 345 | inserted | |
20 gap | reserve for kind_details | |||
landuse | wetland | 345 | ||
20 gap | reserve for kind_details | |||
landuse | land | 346 | ||
landuse | dam | 347 | ||
landuse | groyne | 348 | ||
landuse | dike | 349 | ||
landuse | pier | 350 | ||
landuse | bridge | 351 | ||
pois | stop_area | 352 | ||
places | microhood | 353 | ||
pois | aeroway_gate | 354 | ||
pois | bicycle_rental | 355 | ||
pois | boat_rental | 356 | ||
pois | bus_station | 357 | ||
pois | camera | 358 | ||
pois | car_rental | 359 | ||
pois | copyshop | 360 | ||
pois | dive_centre | 361 | ||
pois | dog_park | 362 | ||
pois | fishing | 363 | ||
pois | fishing_area | 364 | ||
pois | funeral_directors | 365 | ||
pois | harbourmaster | 366 | ||
pois | helipad | 367 | ||
pois | heliport | 368 | ||
pois | hot_spring | 369 | ||
pois | hunting | 370 | ||
pois | information | 371 | ||
earth | islet | 372 | ||
pois | mini_roundabout | 373 | ||
pois | miniature_golf | 374 | ||
pois | photo | 375 | ||
pois | picnic_site | 376 | ||
pois | snow_cannon | 377 | ||
pois | swimming_area | 378 | ||
pois | tyres | 379 | ||
pois | block | 380 | ||
pois | bunker | 381 | ||
20 gap | reserve for kind_details | |||
pois | shelter | 382 | ||
pois | recreation_track | 383 | ||
pois | recycling | 384 | ||
pois | adit | 385 | ||
pois | allotments | 386 | ||
pois | archaeological_site | 387 | ||
pois | bicycle_junction | 388 | ||
pois | boat_lift | 389 | ||
pois | pitch | 390 | ||
100 gap | reserve for kind_details | |||
pois | bollard | 391 | ||
pois | cattle_grid | 392 | ||
pois | crane | 393 | ||
10 gap | reserve for kind_details | |||
pois | ford | 394 | ||
pois | halt | 395 | ||
pois | plaque | 396 | ||
pois | power_tower | 397 | ||
pois | stop | 398 | ||
pois | tram_stop | 399 | ||
pois | tree | 400 | ||
pois | walking_junction | 401 | ||
pois | wayside_cross | 402 | ||
landuse | taxiway | 403 | ||
landuse | runway | 404 | ||
landuse | wastewater_plant | 405 | ||
landuse | water_works | 406 | ||
landuse | works | 407 | ||
landuse | enclosure | 408 | ||
landuse | roller_coaster | 409 | ||
landuse | allotments | 410 | ||
landuse | generator | 411 | ||
landuse | maze | 412 | ||
landuse | hanami | 413 | ||
landuse | amusement_ride | 414 | ||
landuse | picnic_site | 415 | ||
landuse | crane | 416 | ||
10 gap | reserve for kind_details | |||
landuse | embankment | 417 | ||
transit | halt | 418 | ||
transit | stop | 419 | ||
transit | tram_stop | 420 | ||
pois | accountant | 421 | ||
pois | administrative | 422 | ||
pois | advertising_agency | 423 | ||
pois | ambulatory_care | 424 | ||
20 gap | reserve for kind_details | |||
pois | architect | 425 | ||
pois | art | 426 | ||
pois | association | 427 | ||
pois | aviary | 428 | ||
pois | baby_hatch | 429 | ||
pois | bakery | 430 | ||
pois | beauty | 431 | ||
pois | bed_and_breakfast | 432 | ||
pois | blood | 433 | ||
pois | blood_bank | 434 | ||
pois | books | 435 | ||
pois | butcher | 436 | ||
pois | car | 437 | ||
pois | carousel | 438 | ||
pois | chalet | 439 | ||
pois | childcare | 440 | ||
pois | chiropractor | 441 | ||
20 gap | reserve for kind_details | |||
pois | clinic | 442 | ||
20 gap | reserve for kind_details | |||
pois | clothes | 443 | ||
pois | company | 444 | ||
pois | computer | 445 | ||
pois | consulting | 446 | ||
pois | convenience | 447 | ||
pois | craft | 448 | ||
pois | dentist | 449 | ||
20 gap | reserve for kind_details | |||
pois | dispensary | 450 | ||
20 gap | reserve for kind_details | |||
pois | doctors | 451 | ||
20 gap | reserve for kind_details | |||
pois | educational_institution | 452 | ||
pois | employment_agency | 453 | ||
pois | estate_agent | 454 | ||
pois | fashion | 455 | ||
pois | financial | 456 | ||
pois | florist | 457 | ||
pois | foundation | 458 | ||
pois | gift | 459 | ||
pois | government | 460 | ||
pois | greengrocer | 461 | ||
pois | grocery | 462 | ||
pois | guest_house | 463 | ||
pois | hairdresser | 464 | ||
pois | healthcare_centre | 465 | ||
20 gap | reserve for kind_details | |||
pois | hifi | 466 | ||
pois | hospice | 467 | ||
20 gap | reserve for kind_details | |||
pois | hostel | 468 | ||
pois | jewelry | 469 | ||
pois | karaoke | 470 | ||
pois | lawyer | 471 | ||
pois | midwife | 472 | ||
20 gap | reserve for kind_details | |||
pois | mobile_phone | 473 | ||
pois | motorcycle | 474 | ||
pois | newsagent | 475 | ||
pois | newspaper | 476 | ||
pois | ngo | 477 | ||
pois | notary | 478 | ||
pois | optician | 479 | ||
pois | paediatrics | 480 | inserted | |
20 gap | reserve for kind_details | |||
pois | optometrist_paediatrics | 480 | ||
20 gap | reserve for kind_details | |||
pois | perfumery | 481 | ||
pois | petting_zoo | 482 | ||
pois | physician | 483 | ||
20 gap | reserve for kind_details | |||
pois | physiotherapist_physiotherapy | 484 | ||
20 gap | reserve for kind_details | |||
pois | physiotherapist | 484 | inserted | |
20 gap | reserve for kind_details | |||
pois | playground | 485 | ||
pois | psychotherapist | 486 | inserted | |
20 gap | reserve for kind_details | |||
pois | podiatrist | 486 | inserted | |
20 gap | reserve for kind_details | |||
pois | political_party | 487 | ||
pois | rehabilitation | 488 | ||
20 gap | reserve for kind_details | |||
pois | religion | 489 | ||
pois | research | 490 | ||
pois | sanitary_dump_station | 491 | ||
pois | scuba_diving | 492 | ||
pois | snowmobile | 493 | ||
pois | social_facility | 494 | ||
20 gap | reserve for kind_details | |||
pois | speech_therapist | 494 | inserted | |
20 gap | reserve for kind_details | |||
pois | speech | 495 | ||
pois | stationery | 496 | ||
pois | studio | 497 | ||
20 gap | reserve for kind_details | |||
pois | tax_advisor | 498 | ||
pois | telecommunication | 499 | ||
pois | therapist | 500 | ||
pois | tobacco | 501 | ||
pois | travel_agency | 502 | ||
pois | travel_agent | 503 | ||
pois | wildlife_park | 504 | ||
transit | station | 505 | ||
transit | stop_area | 506 | ||
transit | platform | 507 | ||
buildings | building | 508 | ||
200 gap | reserve for kind_details | |||
pois | atv | 509 | ||
pois | bicycle_rental_station | 510 | ||
pois | boat_storage | 511 | ||
pois | bookmaker | 512 | ||
pois | bureau_de_change | 513 | ||
pois | car_parts | 514 | ||
pois | donation | 515 | ||
pois | hanami | 516 | ||
pois | healthcare_alternative | 517 | ||
20 gap | reserve for kind_details | |||
pois | it | 518 | ||
pois | midwife_occupational | 519 | ||
pois | occupational_therapist | 519 | inserted | |
20 gap | reserve for kind_details | |||
pois | money_transfer | 520 | ||
pois | roller_coaster | 521 | ||
pois | amusement_ride | 522 | ||
pois | animal | 523 | ||
pois | artwork | 524 | ||
pois | attraction | 525 | ||
pois | bicycle_parking | 526 | ||
pois | car_repair | 527 | ||
pois | healthcare_laboratory | 528 | ||
20 gap | reserve for kind_details | |||
pois | insurance | 529 | ||
pois | car_wash | 530 | ||
pois | subway_entrance | 531 | ||
pois | gambling | 532 | ||
pois | office | 533 | ||
pois | car_sharing | 534 | ||
pois | charging_station | 535 | ||
pois | enclosure | 536 | ||
pois | lottery | 537 | ||
pois | ship_chandler | 538 | ||
pois | slipway | 539 | ||
pois | summer_toboggan | 540 | ||
pois | industrial | 541 | ||
pois | shop | 542 | ||
pois | slaughterhouse | 543 | ||
pois | stone | 544 | ||
pois | trail_riding_station | 545 | ||
pois | turning_circle | 546 | ||
pois | turning_loop | 547 | ||
pois | water_slide | 548 | ||
pois | water_well | 549 | ||
20 gap | reserve for kind_details | |||
pois | defibrillator | 550 | ||
pois | elevator | 551 | ||
pois | emergency_phone | 552 | ||
pois | fitness_station | 553 | ||
pois | hunting_stand | 554 | ||
pois | karaoke_box | 555 | ||
pois | lifeguard_tower | 556 | ||
pois | mast | 557 | ||
pois | maze | 558 | ||
pois | memorial | 559 | ||
pois | mooring | 560 | ||
20 gap | reserve for kind_details | |||
pois | motorcycle_parking | 561 | ||
pois | petroleum_well | 562 | ||
pois | platform | 563 | ||
pois | pylon | 564 | ||
pois | rock | 565 | ||
earth | earth | 566 | ||
landuse | apron | 567 | ||
landuse | substation | 568 | ||
landuse | summer_toboggan | 569 | ||
landuse | plant | 570 | ||
landuse | pitch | 571 | ||
landuse | animal | 572 | ||
landuse | artwork | 573 | ||
landuse | carousel | 574 | ||
landuse | water_slide | 575 | ||
landuse | parking | 576 | ||
water | fountain | 577 | ||
water | ditch | 578 | ||
water | drain | 579 | ||
water | swimming_pool | 580 | ||
landuse | breakwater | 581 | ||
landuse | cutline | 582 | ||
landuse | hedge | 583 | ||
landuse | tree_row | 584 | ||
landuse | retaining_wall | 585 | ||
landuse | snow_fence | 586 | ||
landuse | fence | 587 | ||
50 gap | reserve for kind_details | |||
landuse | wall | 588 | ||
20 gap | reserve for kind_details | |||
landuse | power_minor_line | 589 | ||
landuse | power_line | 590 | ||
transit | bus_stop | 591 | ||
buildings | building_part | 592 | ||
50 gap | reserve for kind_details | |||
pois | atm | 593 | ||
pois | bus_stop | 594 | ||
pois | firepit | 595 | ||
pois | life_ring | 596 | ||
pois | picnic_table | 597 | ||
pois | shower | 598 | ||
pois | taxi | 599 | ||
pois | telephone | 600 | ||
pois | toilets | 601 | ||
10 gap | reserve for kind_details | |||
pois | waste_disposal | 602 | ||
pois | bbq | 603 | ||
pois | bicycle_repair_station | 604 | ||
pois | cycle_barrier | 605 | ||
pois | drinking_water | 606 | ||
pois | phone | 607 | ||
buildings | address | 608 | ||
pois | bench | 609 | ||
buildings | entrance | 610 | ||
20 gap | reserve for kind_details | |||
buildings | exit | 611 | ||
10 gap | reserve for kind_details | |||
pois | fire_hydrant | 612 | ||
pois | gas_canister | 613 | ||
pois | level_crossing | 614 | ||
pois | love_hotel | 615 | ||
pois | post_box | 616 | ||
pois | power_pole | 617 | ||
pois | street_lamp | 618 | ||
pois | traffic_signals | 619 | ||
pois | waste_basket | 620 | ||
pois | water_point | 621 | ||
pois | watering_place | 622 | ||
catchall | in case we missing adding kind later |
Just confirming: https://github.com/tilezen/vector-datasource/issues/988#issuecomment-453301208
JS supports functions for priority
for both text and point styles right?
Yep!
On Fri, Jan 18, 2019 at 8:09 PM Varun notifications@github.com wrote:
Just confirming:
988 (comment)
https://github.com/tilezen/vector-datasource/issues/988#issuecomment-453301208
JS supports functions for priority for both text and point styles right?
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/tilezen/vector-datasource/issues/988#issuecomment-455734593, or mute the thread https://github.com/notifications/unsubscribe-auth/AABBXYd2ZUhsa-Lmu_M1lnt9Ldq5WC23ks5vEnBJgaJpZM4JsNQZ .
We need to add in the population ranks for places layer locality
, country
, region
and then this can be considered finished. Otherwise it's hard to mix in server side and client side collision orders.
See: https://github.com/tilezen/vector-datasource/issues/988#issuecomment-453262892 for population breaks.
While the min_zoom
values (and server filtering) we have are mostly doing the right thing, there are some zooms, especially where we first switch over to OSM and when we add a lot of new OSM features that it wigs out a bit. Zoom 8 and 9 and 10 seem especially problematic.
Here we don't see Los Angeles label (which does label in previous and next zooms), and is a regression over v1.6 with client-side population graded priority ranks.
In the case of San Jose south of San Francisco it seems to also be because we're not carrying the NE min_zoom onto the OSM feature, which means park labels then push what was visible out of the way.
QA verified, looks so much better :)
I also see the new population_rank
on countries, regions, and localities FTW.
LA now:
SF now:
DC:
NYC:
Paris:
ooh
On Wed, Feb 13, 2019 at 7:31 PM Nathaniel V. KELSO notifications@github.com wrote:
QA verified, looks so much better :)
I also see the new population_rank on countries, regions, and localities FTW.
LA now:
[image: image] https://user-images.githubusercontent.com/853051/52753515-c145c900-2fab-11e9-889e-dd077bcc1103.png
SF now:
[image: image] https://user-images.githubusercontent.com/853051/52753459-90fe2a80-2fab-11e9-9631-6fc240f06905.png
DC:
[image: image] https://user-images.githubusercontent.com/853051/52753538-e4707880-2fab-11e9-97a7-c38d3655f353.png
NYC:
[image: image] https://user-images.githubusercontent.com/853051/52753552-f81bdf00-2fab-11e9-92be-3f93dd7bc6bd.png
Paris:
[image: image] https://user-images.githubusercontent.com/853051/52753575-0cf87280-2fac-11e9-8286-cbd769b203dc.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/tilezen/vector-datasource/issues/988#issuecomment-463433479, or mute the thread https://github.com/notifications/unsubscribe-auth/AABBXQy7gw-yNowws1lybQdjqnbIRXEcks5vNK3wgaJpZM4JsNQZ .
When two different kinds features of equal min_zoom collide, which should win?
I have a big spreadsheet of relative ranks between
kind
&kind_detail
values (as part of the category work). This would remove a good bit of hack logic from the stylesheet, and provide much more fidelity than we have currently there.Since the discussion is so long, the related PR is: https://github.com/tilezen/vector-datasource/pull/1793.