Edit something like (adjusting low zooms and then moving others by a zoom to filter out along the way each zoom):
# some water polygon features are too small to need a label - and if we label
# them then the label is often so prominent that it hides the polygon it's
# for! see the images here for examples of this:
# https://github.com/tilezen/vector-datasource/issues/1477#issuecomment-447162484
#
# we want to reset min_zoom on these features and screen them out if they
# don't meet minimum sizes per zoom.
- fn: vectordatasource.transform.update_min_zoom
params:
source_layer: water
start_zoom: 4
end_zoom: 16
# the inclusion of "None" in the list might seem odd, but None compares
# numerically smaller than any integer, so acts as a default for this
# table.
min_zoom: >-
[min_zoom for min_zoom, area_threshold in [
(4, 120000000000),
(5, 80000000000),
(6, 40000000000),
(7, 10000000000),
(8, 500000000),
(9, 200000000),
(10, 50000000),
(11, 10000000),
(12, 1000000),
(13, 500000),
(14, 50000),
(15, 10000),
(16, None),
] if area >= area_threshold][0]
where: >-
kind == 'lake' and label_placement
Then there are also removing line labels, which is controlled around, it should be done before label placements are generated:
- fn: vectordatasource.transform.drop_properties
params:
source_layer: water
start_zoom: 0
end_zoom: 16
# short-hand for "name" property in the list below means all name-like
# properties.
all_name_variants: true
properties:
- name
where: >-
(kind == 'sea' and zoom < 4) or
(kind == 'lake' and zoom < 5) or
(kind == 'river' and zoom < 12) or
(kind == 'canal' and zoom < 13) or
(kind == 'dam' and zoom < 14) or
(kind == 'stream' and zoom < 14) or
(kind == 'ditch' and zoom < 15) or
(kind == 'drain' and zoom < 15) or
(is_tunnel == true and zoom < 16)
Picking up from where #1477 leftoff... There are still a lot of water labels in the mid-zoom tiles.
This is controlled with this config:
Edit something like (adjusting low zooms and then moving others by a zoom to filter out along the way each zoom):
Then there are also removing line labels, which is controlled around, it should be done before label placements are generated:
For the following kinds:
Something like: