From 4ef21714fa2d1c0fd79839294950eb464b036891 Mon Sep 17 00:00:00 2001
From: Daniel Schadt <kingdread@gmx.de>
Date: Sun, 5 Apr 2026 17:11:25 +0200
Subject: update docs

---
 README.adoc | 54 +++++++++++++++++++++++++++++++++++-------------------
 1 file changed, 35 insertions(+), 19 deletions(-)

(limited to 'README.adoc')

diff --git a/README.adoc b/README.adoc
index 569d672..0692a05 100644
--- a/README.adoc
+++ b/README.adoc
@@ -42,39 +42,55 @@ the `--output/-o` option.
 
 In order to overcome storage overhead when saving many small files (see the tip
 and table further below), `hittekaart` can instead output a SQLite database
-with the heatmap tile data. To do so, use the `--format=sqlite` command line
-option, and control where the SQLite file should be placed with `--output`/`-o`.
+with the heatmap tile data. Two formats are available for this:
 
-While this does not allow you to immediately serve the tiles with a HTTP
-server, it does cut down on the wasted space on non-optimal file systems.
-
-The generated SQLite file will have one table with the following schema:
+*OSMAND* compatible output can be generated by the `--format=osm-and` option.
+In this case, `--output`/`-o` can be used to control the output filename. The
+OsmAnd format is relatively simple, its main data lies in a single `tiles`
+table:
 
 [source,sql]
-----
+-----
 CREATE TABLE tiles (
-    zoom INTEGER,
     x INTEGER,
     y INTEGER,
-    data BLOB,
-    PRIMARY KEY (zoom, x, y)
+    z INTEGER,
+    image BLOB,
+    time INTEGER,
+    PRIMARY KEY (x, y, z)
 );
-----
+-----
 
-=== OSMAND OUTPUT
-
-You can generate a file that can be read directly by
-https://osmand.net/[OsmAnd]. To do so, pass the `--format=osm-and` command line
-option, and control where the file should be placed with `--output`/`-o`.
+The `time` column is always `NULL`.
 
 To use the map in the app, make sure to:
 
 * Give it a `.sqlitedb` extension, and
 * place it under `Android/data/net.osmand.plus/files/tiles/`.
 
-For a reference of the format, see
+For a full reference of the format, see
 https://osmand.net/docs/technical/osmand-file-formats/osmand-sqlite/.
 
+*MBTILES* files can be generated by the `--format=mb-tiles` option. Like OsmAnd
+files, MBTiles are also SQLite databases. In this case, the main table has the
+following scheme:
+
+[source,sql]
+-----
+CREATE TABLE tiles (
+    zoom_level INTEGER,
+    tile_column INTEGER,
+    tile_row INTEGER,
+    tile_data BLOB,
+    PRIMARY KEY (zoom_level, tile_column, tile_row)
+);
+-----
+
+Note that the `tile_row` is inverted.
+
+For a full reference of the format, see
+https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md.
+
 === INPUT FILES
 
 `hittekaart` expects GPX track files with the `.gpx` extension. It will parse
@@ -219,8 +235,8 @@ The following options are supported:
     a SQLite database.
 
 `--format=FORMAT`::
-    Sets the output format (folder, sqlite, osm-and). See the sections above on
-    OUTPUT FORMAT, SQLITE OUTPUT and OSMAND OUTPUT for more information.
+    Sets the output format (folder, osm-and, mb-tiles). See the sections above
+    on OUTPUT FORMAT and SQLITE OUTPUT for more information.
 
 `-m MODE`, `--mode=MODE`::
     Sets the overlay generation mode (heatmap, marktile, tilehunter). See
-- 
cgit v1.2.3

