diff options
| author | Daniel Schadt <kingdread@gmx.de> | 2026-04-12 13:28:52 +0200 |
|---|---|---|
| committer | Daniel Schadt <kingdread@gmx.de> | 2026-04-12 13:28:52 +0200 |
| commit | b580d82834c0973a344e3dafd6979204c5364047 (patch) | |
| tree | 0553833ccf003a919d6a6ee4fe64204a304347cd /README.adoc | |
| parent | a3b378fd66342ecf9a44f814acf1b18a49a05c42 (diff) | |
| parent | b498afaf08cc0f9ccede8caf159f82a126c6d2e2 (diff) | |
| download | hittekaart-b580d82834c0973a344e3dafd6979204c5364047.tar.gz hittekaart-b580d82834c0973a344e3dafd6979204c5364047.tar.bz2 hittekaart-b580d82834c0973a344e3dafd6979204c5364047.zip | |
Merge branch 'osmand-sqlite'
Diffstat (limited to 'README.adoc')
| -rw-r--r-- | README.adoc | 61 |
1 files changed, 45 insertions, 16 deletions
diff --git a/README.adoc b/README.adoc index bb779b5..0692a05 100644 --- a/README.adoc +++ b/README.adoc @@ -8,7 +8,7 @@ hittekaart - A GPX track heatmap generator. == SYNOPSIS ---- -hittekaart [--output=...] [--min-zoom=...] [--max-zoom=...] [--threads=...] [--sqlite] FILES... +hittekaart [--output=...] [--min-zoom=...] [--max-zoom=...] [--threads=...] [--format=...] FILES... ---- == INSTALLATION @@ -42,24 +42,54 @@ 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 `--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) ); ----- +----- + +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 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 @@ -204,10 +234,9 @@ The following options are supported: when generating single files, and `tiles.sqlite` when storing the tiles in a SQLite database. -`--sqlite`:: - Output a single SQLite file with all tiles instead of saving each tile as a - separate PNG file. In this case, `-o` can be used to set the location of - the SQLite database. The schema is described above. +`--format=FORMAT`:: + 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 |
