Working with MBTiles archives
Martin includes mbtiles
utility to interact with the *.mbtiles
files from the command line.
It allows users to examine, copy, validate or compare and apply diffs between them.
This tool can be installed by compiling the latest released version with cargo install mbtiles --locked
, or by downloading a pre-built binary from the releases page.
Use mbtiles --help
to see a list of available commands:
A utility to work with .mbtiles file content
Usage: mbtiles <COMMAND>
Commands:
summary Show MBTiles file summary statistics
meta-all Prints all values in the metadata table in a free-style, unstable YAML format
meta-get Gets a single value from the MBTiles metadata table
meta-set Sets a single value in the MBTiles metadata table or deletes it if no value
diff Compare two files A and B, and generate a new diff file. If the diff file is applied to A, it will produce B
copy Copy tiles from one mbtiles file to another
apply-patch Apply diff file generated from 'copy' command
meta-update Update metadata to match the content of the file
validate Validate tile data if hash of tile data exists in file
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
Use RUST_LOG environment variable to control logging level, e.g. RUST_LOG=debug or RUST_LOG=mbtiles=debug. See https://docs.rs/env_logger/latest/env_logger/index.html#enabling-logging for more information.
And mbtiles <command> --help
to see help for a specific command.
Example for mbtiles validate --help
:
Validate tile data if hash of tile data exists in file
Usage: mbtiles validate [OPTIONS] <FILE>
Arguments:
<FILE>
MBTiles file to validate
Options:
--integrity-check <INTEGRITY_CHECK>
Value to specify the extent of the SQLite integrity check performed
[default: quick]
[possible values: quick, full, off]
--agg-hash <AGG_HASH>
How should the aggregate tiles hash be checked or updated
Possible values:
- verify: Verify that the aggregate tiles hash value in the metadata table matches the computed value. Used by default
- update: Update the aggregate tiles hash value in the metadata table
- off: Do not check the aggregate tiles hash value
-h, --help
Print help (see a summary with '-h')