Skip to content

Commit

Permalink
Add doc about mbtiles diff command
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkAndshark committed Feb 7, 2024
1 parent 4e067c5 commit f635fe0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/src/mbtiles-diff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Diffing MBTiles

## `mbtiles diff`

Diff command compares two mbtiles files `file A` and `file B`, and generates a delta (diff) file. If the diff file is [applied](mbtiles-copy.md#mbtiles-apply-patch) to `A`, it will produce `B`.
The delta file will contain all tiles that are different between the two files (modifications, insertions, and deletions as `NULL` values), for both the tile and metadata tables.
The only exception is `agg_tiles_has` metadata value. It will be renamed to `agg_tiles_hash_in_diff` and a new `agg_tiles_hash` will be generated for the diff file itself.

```shell
# This command will comapre `file_a.mbtiles` and `file_b.mbtiles`, and generate a new diff file `diff_result.mbtiles`,This command will compares file_a.mbtiles and file_b.mbtiles, and generates a new diff file diff_result.mbtiles
# If the diff file is applied to file_a, it will produce file_b.
mbtiles diff file_a.mbtiles file_b.mbtiles diff_result.mbtiles //
```

Check failure on line 13 in docs/src/mbtiles-diff.md

View workflow job for this annotation

GitHub Actions / Build Docs

Trailing spaces

docs/src/mbtiles-diff.md:13:4 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] https://github.com/DavidAnson/markdownlint/blob/v0.33.0/doc/md009.md

0 comments on commit f635fe0

Please sign in to comment.