mirror of
https://github.com/mapbox/tippecanoe.git
synced 2025-02-24 18:50:44 +00:00
commit
e66d976d55
27
README.md
27
README.md
@ -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
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user