TPKs may have zoom levels for which all tiles are empty. For example, a tile package may have non-empty tiles up to level 16, but then have levels 17-23 filled with empty tiles (I'm unsure what generation settings at cause this but have seen such packages in the wild).
This PR avoids an exception caused by this situation by refining the available zooms (and thus the max zoom) according to non-empty tiles so that the highest_zoom value represents a zoom level actually present in the newly-created mbtiles database when --drop-emtpy is used.
TPKs may have zoom levels for which all tiles are empty. For example, a tile package may have non-empty tiles up to level 16, but then have levels 17-23 filled with empty tiles (I'm unsure what generation settings at cause this but have seen such packages in the wild).
This PR avoids an exception caused by this situation by refining the available zooms (and thus the max zoom) according to non-empty tiles so that the
highest_zoom
value represents a zoom level actually present in the newly-created mbtiles database when--drop-emtpy
is used.