mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-23 10:30:16 +00:00
Document how to choose high-zoom dot sizes
This commit is contained in:
parent
3d074653b5
commit
0cd733eb77
24
README.md
24
README.md
@ -67,6 +67,30 @@ Example
|
||||
|
||||
cat tiger/tl_2014_*_roads.json | tippecanoe -o tiger.mbtiles -l roads -n "All TIGER roads, one zoom" -z12 -Z12 -d14 -x LINEARID -x RTTYP
|
||||
|
||||
Point styling
|
||||
-------------
|
||||
|
||||
To provide a consistent density gradient as you zoom, the Mapbox Studio style needs to be
|
||||
coordinated with the base zoom level and dot-dropping rate. You can use this shell script to
|
||||
calculate the appropriate marker-width at high zoom levels to match the fraction of dots
|
||||
that were dropped at low zoom levels.
|
||||
|
||||
awk 'BEGIN {
|
||||
dotsize = 2; # up to you to decide
|
||||
basezoom = 14; # tippecanoe -z 14
|
||||
rate = 2.5; # tippecanoe -r 2.5
|
||||
|
||||
print " marker-line-width: 0;";
|
||||
print " marker-ignore-placement: true;";
|
||||
print " marker-allow-overlap: true;";
|
||||
print " marker-width: " dotsize ";";
|
||||
for (i = basezoom + 1; i <= 22; i++) {
|
||||
print " [zoom >= " i "] { marker-width: " (dotsize * exp(log(sqrt(rate)) * (i - basezoom))) "; }";
|
||||
}
|
||||
|
||||
exit(0);
|
||||
}'
|
||||
|
||||
Geometric simplifications
|
||||
-------------------------
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user