Add sample filter to limit tiles to a bounding box

This commit is contained in:
Eric Fischer
2017-05-04 10:25:53 -07:00
parent f9f57ebb3f
commit 263a1b9e5f
3 changed files with 49 additions and 0 deletions
+9
View File
@@ -222,6 +222,7 @@ resolution is obtained than by using a smaller _maxzoom_ or _detail_.
The pre- and post-filter commands allow you to do optional filtering or transformation on the features of each tile
as it is created. They are shell commands, run with the zoom level, X, and Y as the `$1`, `$2`, and `$3` arguments.
Future versions of Tippecanoe may add additional arguments for more context.
The features are provided to the filter
as a series of newline-delimited GeoJSON objects on the standard input, and `tippecanoe` expects to read another
@@ -243,6 +244,14 @@ contain `index`, `sequence`, and `extent` elements, which must be passed through
```
tippecanoe -o countries.mbtiles -z5 -C 'mkdir -p tiles/$1/$2; tee tiles/$1/$2/$3.geojson' ne_10m_admin_0_countries.json
```
* Make a tileset of the Natural Earth countries to zoom level 5, but including only those tiles that
intersect the [bounding box of Germany](https://www.flickr.com/places/info/23424829).
(The `limit-tiles-to-bbox` script is [in the Tippecanoe source directory](filters/limit-tiles-to-bbox)].)
```
tippecanoe -o countries.mbtiles -z5 -C './filters/limit-tiles-to-bbox 5.8662 47.2702 15.0421 55.0581 $*' ne_10m_admin_0_countries.json
```
Environment