Skip to content

Commit 1425707

Browse files
docs: make mbtiles schema appear (#2585)
This does not quite work as I would expect. Not sure why it does not throw an error.
1 parent c00462d commit 1425707

File tree

5 files changed

+11
-4
lines changed

5 files changed

+11
-4
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../mbtiles/sql/init-flat-with-hash.sql

docs/content/files/init-flat.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../mbtiles/sql/init-flat.sql
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../mbtiles/sql/init-normalized.sql

docs/content/mbtiles-schema.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,27 @@ The `mbtiles` tool builds on top of the original [MBTiles specification](https:/
77
Flat schema is the closest to the original MBTiles specification. It stores all tiles in a single table. This schema is the most efficient when the tileset contains no duplicate tiles.
88

99
```sql
10-
--8<-- "init-flat.sql"
10+
--8<-- "files/init-flat.sql"
1111
```
1212

1313
## flat-with-hash
1414

1515
Similar to the `flat` schema, but also includes a `tile_hash` column that contains a hash value of the `tile_data` column. Use this schema when the tileset has no duplicate tiles, but you still want to be able to validate the content of each tile individually.
1616

1717
```sql
18-
--8<-- "init-flat-with-hash.sql"
18+
--8<-- "files/init-flat-with-hash.sql"
1919
```
2020

2121
## normalized
2222

2323
Normalized schema is the most efficient when the tileset contains duplicate tiles. It stores all tile blobs in the `images` table, and stores the tile Z,X,Y coordinates in a `map` table. The `map` table contains a `tile_id` column that is a foreign key to the `images` table. The `tile_id` column is a hash of the `tile_data` column, making it possible to both validate each individual tile like in the `flat-with-hash` schema, and also to optimize storage by storing each unique tile only once.
2424

25+
```sql
26+
--8<-- "files/init-normalized.sql:0:28"
27+
```
28+
2529
Optionally, `.mbtiles` files with `normalized` schema can include a `tiles_with_hash` view. All `normalized` files created by the `mbtiles` tool will contain this view.
2630

2731
```sql
28-
--8<-- "init-normalized.sql"
32+
--8<-- "files/init-normalized.sql:30:39"
2933
```

zensical.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ pygments_lang_class = true
378378
[project.markdown_extensions.pymdownx.inlinehilite]
379379

380380
[project.markdown_extensions.pymdownx.snippets]
381-
base_path = ["docs/content", "mbtiles/sql", "/"]
381+
base_path = ["docs/content"]
382382

383383
[project.markdown_extensions.pymdownx.superfences]
384384
custom_fences = [

0 commit comments

Comments
 (0)