Skip to content

Support gzip for tile data #95

@jaakla

Description

@jaakla

For example tippecanoe exports tiles to directory as uncompressed pbf, but normally (like for mb studio) you need gzipped pbf, otherwise mb studio rejects it. The mbtiles metadata unfortunately does not specify tile data compression, so you kind of need to know whether "pbf" means plain or gzipped pbf. It has no much point for png or jpg as these are already compressed, but for pbf it makes a lot of sense - 50 and more % reduction.

So if you use mb-util to convert folder with pbf tiles to mbtiles the resulting mbtiles is big and just does not work for some targets. So I suggest to add flag -gzip to the tool to compress each tile data in the 'images' table. As a workaround manual compression of tiles before running mb-util (something like gzip *.pbf; mv *.pbf.gz *.pbf in each folder) is also an option, but with larger tilesets (I have biggest ones with ~100M tiles) it is kind of tedious.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions