2014-09-26 21:45:45 +00:00
|
|
|
tippecanoe
|
|
|
|
==========
|
2014-02-08 00:25:54 +00:00
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
Build vector tilesets from large collections of GeoJSON features.
|
2014-02-08 00:25:54 +00:00
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
Usage
|
2014-02-08 00:25:54 +00:00
|
|
|
-----
|
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
tippecanoe -o file.mbtiles [file.json]
|
2014-02-08 02:11:36 +00:00
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
If the file is not specified, it reads GeoJSON from the standard input.
|
2014-02-08 02:11:36 +00:00
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
Options
|
2014-02-08 17:57:55 +00:00
|
|
|
-------
|
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
* -l Layer name (default "file" if source is file.json)
|
|
|
|
* -n Human-readable name (default file.json)
|
|
|
|
* -z Base zoom level (default 14)
|
|
|
|
* -Z Lowest zoom level (default 0)
|
|
|
|
* -d Detail at base zoom level (default 12, for tile resolution of 4096)
|
|
|
|
* -D Detail at lower zoom levels (default 10, for tile resolution of 1024)
|
2014-02-08 17:57:55 +00:00
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
Example
|
|
|
|
-------
|
2014-02-08 02:11:36 +00:00
|
|
|
|
2014-09-26 21:51:19 +00:00
|
|
|
tippecanoe -o alameda.mbtiles -l alameda -n "Alameda County from TIGER" -z12 -d14 tl_2014_06001_roads.json
|
2014-02-08 18:45:25 +00:00
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
Geometric simplifications
|
|
|
|
-------------------------
|
2014-02-08 18:45:25 +00:00
|
|
|
|
2014-09-26 22:27:20 +00:00
|
|
|
At every zoom level, line and polygon features are subjected to Douglas-Peucker
|
|
|
|
simplification to the resolution of the tile.
|
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
For point features, it drops 1/2.5 of the dots for each zoom level above the base.
|
2014-09-26 22:20:08 +00:00
|
|
|
I don't know why 2.5 is the appropriate number, but the densities of many different
|
|
|
|
data sets fall off at about this same rate.
|
2014-02-08 18:45:25 +00:00
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
For line features, it drops any features that are too small to draw at all.
|
2014-09-26 22:36:41 +00:00
|
|
|
This still leaves the lower zooms too dark (and too dense for the 500K tile limit,
|
|
|
|
in some places), so I need to figure out an equitable way to throw features away.
|
2014-02-08 18:45:25 +00:00
|
|
|
|
2014-09-26 21:45:45 +00:00
|
|
|
It also throws away any polygons that are too small to draw. I'm not sure yet
|
|
|
|
if it is appropriate to do more than that.
|
2014-09-26 21:51:19 +00:00
|
|
|
|
|
|
|
Development
|
|
|
|
-----------
|
|
|
|
|
2014-09-26 22:25:12 +00:00
|
|
|
Requires protoc (brew install protobuf), protobuf-lite, and sqlite3. To build:
|
2014-09-26 21:51:19 +00:00
|
|
|
|
|
|
|
make
|
2014-09-26 22:20:08 +00:00
|
|
|
|
|
|
|
and perhaps
|
|
|
|
|
|
|
|
make install
|