Skip to content

Commit c00462d

Browse files
authored
docs: zensical and content updates (#2584)
- Adds `mbtiles/sql` snippets to base path - Clarifies table sources to include views - Fixes `edit_uri` for "Edit this page"
1 parent 5527c71 commit c00462d

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

docs/content/mbtiles-schema.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,23 @@ 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<-- "mbtiles/sql/init-flat.sql"
10+
--8<-- "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<-- "mbtiles/sql/init-flat-with-hash.sql"
18+
--8<-- "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<-- "mbtiles/sql/init-normalized.sql"
27-
```
28-
2925
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.
3026

3127
```sql
32-
--8<-- "mbtiles/sql/init-normalized.sql:26:"
28+
--8<-- "init-normalized.sql"
3329
```

docs/content/sources-pg-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PostgreSQL Function Sources
22

3-
Function Source is a database function which can be used to
3+
A Function Source is a database function which can be used to
44
query [vector tiles](https://github.com/mapbox/vector-tile-spec). When started, Martin will look for the functions with
55
a suitable signature.
66

docs/content/sources-pg-tables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PostgreSQL Table Sources
22

3-
Table Source is a database table which can be used to query [vector tiles](https://github.com/mapbox/vector-tile-spec). If a [PostgreSQL connection string](pg-connections.md) is given, Martin will publish all tables as data sources if they have at least one geometry column. If geometry column SRID is 0, a default SRID must be set, or else that geo-column/table will be ignored. All non-geometry table columns will be published as vector tile feature tags (properties).
3+
A Table Source is a database table or view which can be used to query [vector tiles](https://github.com/mapbox/vector-tile-spec). If a [PostgreSQL connection string](pg-connections.md) is given, Martin will publish all tables as data sources if they have at least one geometry column. If geometry column SRID is 0, a default SRID must be set, or else that geo-column/table will be ignored. All non-geometry table columns will be published as vector tile feature tags (properties).
44

55
## Modifying Tilejson
66

zensical.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ site_dir = "target/book"
1212
site_name = "Martin Tile Server Documentation"
1313
site_description = "Documentation for Martin Tile Server"
1414
repo_url = "https://github.com/maplibre/martin"
15+
edit_uri = "edit/main/docs/content"
1516
site_author = "Maplibre Contributors"
1617
copyright = "Copyright &copy; 2026 MapLibre Contributors"
1718

@@ -377,7 +378,7 @@ pygments_lang_class = true
377378
[project.markdown_extensions.pymdownx.inlinehilite]
378379

379380
[project.markdown_extensions.pymdownx.snippets]
380-
base_path = ["docs/content", "/"]
381+
base_path = ["docs/content", "mbtiles/sql", "/"]
381382

382383
[project.markdown_extensions.pymdownx.superfences]
383384
custom_fences = [

0 commit comments

Comments
 (0)