Skip to content

Feature/init tile grid

Karsten Prehn requested to merge feature/init-tile-grid into main

This adds a script to initialize the tiles-database with a basic coverage of low-level tiles (4 level-1 tiles by default), to provide an initial data-set as a starting point for the Discretizer. As a second functionality, the script writes all quadkeys of a specific level into a file (level-9 by default), to provide a list of quadkeys to process when creating the world-wide coastline dataset.

Examples:

python init_tile-grid.py -h

prints a help message

python init_tile-grid.py -l 9 -i 1 -y -t -o quadkeys.out

writes the quadkeys of a level-9 grid (-l 9) to file (-o quadkeys.out), creates a new level-1 (-i 1) tile-grid (-t) in the database, and automatically answers all user input messages with yes (-y)

python init_tile-grid.py -l 9 -nt -o quadkeys.out

as above, writes the quadkeys of a level-9 tile-grid to file, but doesn't create a new tiles-database (-nt)

Additionally, this MR improves on the import SQL-statement to check the database during transaction for the maximum region that is save to remove tiles from. This is to prevent tile imports to overwrite each other when the tiles-database changed during calculation.

\approve @ds @laurens

Edited by Karsten Prehn

Merge request reports