Merge pull request #28 from mapbox/dot-size-doc

Dot size doc
This commit is contained in:
Eric Fischer 2015-03-26 11:28:43 -07:00
commit e66d976d55

View File

@ -67,6 +67,33 @@ 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 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.
If you used <code>-z</code> to change the base zoom level or <code>-r</code> to change the
dot-dropping rate, replace them in the <code>basezoom</code> and <code>rate</code> below.
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 Geometric simplifications
------------------------- -------------------------