mapbox / tippecanoe

Build vector tilesets from large collections of GeoJSON features.
BSD 2-Clause "Simplified" License
2.73k stars 432 forks source link

Metadata maxzoom can exceed tiles maxzoom in the event of tiling errors #899

Open e-n-f opened 3 years ago

e-n-f commented 3 years ago

This command generates an mbtiles file with tiles in zoom level 10 but with a maxzoom of 9.

➤ tippecanoe -M 300000 -m 12 -f -o sf.mbtiles tl_2010_06075_tabblock10.json
For layer 0, using name "tl_2010_06075_tabblock10"
7386 features, 830964 bytes of geometry, 667 bytes of separate metadata, 372203 bytes of string pool
tile 10/163/395 size is 309529 with detail 12, >300000
could not make tile 10/163/395 small enough

*** NOTE TILES ONLY COMPLETE THROUGH ZOOM 9 ***

➤ sqlite3 sf.mbtiles
SQLite version 3.24.0 2018-06-04 14:10:15
Enter ".help" for usage hints.
sqlite> select * from metadata where name='maxzoom';
maxzoom|9
sqlite> SELECT MAX(zoom_level) as z FROM tiles;
10

It will be rejected by Mapbox uploads after https://github.com/mapbox/mapbox-upload-validate/pull/102.