Open
Description
In the v1.6 release we made scale_rank
and min_zoom
more consistent. This issue is making them completely consistent, and then retiring scale_rank
(a breaking v2 change).
From the map examples, including the clamping:
scale_rank | min_zoom | color in map |
---|---|---|
1 | 13 | dark green |
2 | 13.5 | ¿missing? |
3 | 14 | dark blue |
4 | 14.5 | light blue |
5 | 15 | light green |
In the existing building.yaml file:
- &z13_area_volume
all:
any:
way_area: { min: 5000 }
volume: { min: 150000 }
not: { "tags->location": "underground" }
- &z14_area_volume
any:
way_area: { min: 3000 }
volume: { min: 100000 }
- &z15_area_volume
way_area: { min: 20 }
- &z16_area_volume
way_area: { min: 10 }
In Bubble Wrap:
problematic at zoom 15
filter:
# show footprints for buildings at least one zoom level before they will be extruded
- { $zoom: 13, scale_rank: [1,2] }
- { $zoom: 14, scale_rank: [1,2,3] }
- { $zoom: 15, height: { min: 100 } }
- { $zoom: 15, area: { min: 500 } }
- { $zoom: 15, volume: { min: 100000 } }
- { $zoom: 16, area: { min: 100 } }
- { $zoom: 16, volume: { min: 50000 } }
- { $zoom: { min: 17 }, area: true }
In Refill (map):
problematic at zoom 15
footprints:
filter:
any:
- { $zoom: [13], scale_rank: [1,2] }
- { $zoom: [14], scale_rank: [1,2,3] }
- { $zoom: [15], height: { min: 100 } }
- { $zoom: [15], area: { min: 500 } }
- { $zoom: [15], volume: { min: 100000 } }
- { $zoom: [16], area: { min: 100 } }
- { $zoom: [16], volume: { min: 50000 } }
- { $zoom: { min: 17 }, area: true }
Then the existing scale_rank.csv is:
area::int,height::float,volume::int,landuse_kind,scale_rank
>=100000,*,*,*,1
*,>=250,*,*,1
*,*,>=300000,*,1
>=20000,*,*,*,2
>=5000,*,*,+,2
*,>=150,*,*,2
*,*,>=150000,*,2
>=5000,*,*,*,3
>=3000,*,*,+,3
*,>=100,*,*,3
*,*,>=100000,*,3
>=1000,*,*,*,4
>=500,*,*,+,4
*,*,>=50000,*,4
+,*,*,*,5
Should the building.yaml file change like (I'm fussy on the landuse_kind and 14.5 logic)?
- &z13_area_volume
all:
any:
way_area: { min: 100000 } # was 5000, larger value from scale_rank CSV
height: { min: 250 } # newly added from scale_rank CSV
volume: { min: 300000 } # was 150000, larger value from scale_rank CSV
not: { "tags->location": "underground" }
- &z14_area_volume
any:
way_area: { min: 3000 } # no change, same as scale_rank CSV (prefer landuse area)
height: { min: 100 } # newly added from scale_rank CSV
volume: { min: 100000 } # no change, same as scale_rank CSV
not: { "tags->location": "underground" } # NEW
# needs corresponding YAML change later on for 14.5 min_zoom assignment
- &z14d5_area_volume
any:
way_area: { min: 500 } # NEW, same as scale_rank CSV (prefer landuse area)
height: { min: 100 } # NEW, same as scale_rank CSV (from z14_area_volume)
volume: { min: 50000 } # NEW, same as scale_rank CSV
not: { "tags->location": "underground" } # NEW
- &z15_area_volume
any:
way_area: { min: 200 } # was 20, larger value between scale_rank CSV (100) and map style (500)
height: { min: 15 } # NEW, middle ground to remove < 3 story buildings; map style 100
volume: { min: 10000 } # NEW, smaller compromise between area * height, map style (100000)
- &z16_area_volume
way_area: { min: 10 } # no change, same as scale_rank CSV, because of backyard sheds
# Implied that features with way_area smaller than 10 are `min_zoom: 17` later in YAML
Originally posted by @nvkelso in https://github.com/tilezen/vector-datasource/pull/1739/files