From c2ce0cdd3681617ad763560b4def6dce03b83dfb Mon Sep 17 00:00:00 2001 From: nobohan Date: Thu, 22 Jun 2023 16:52:25 +0200 Subject: [PATCH] add a generate_tile command --- README.md | 15 ++++++++++++++- run.sh | 10 ++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dad94ce..670efd8 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,21 @@ INFO:root: Import complete docker-compose run --rm map run ``` -The tiles are available on http://192.168.176.2/ (should be on http://localhost:8080/ though...) +The tiles are available on http://192.168.176.2/ or something like that. Have a look at the docker container to know which is the IP address: there is a message like "Could not reliably determine the server's fully qualified domain name, using 192.168.176.2.". (should be on http://localhost:8080/ though...) +#### Generate tiles from a list + +There's a script in utils to generate a list of tiles to be used to generate the tiles. + +```bash +python3 generate-tiles-list.py > tiles.list +``` + +Move this `tiles.list` file in the `/tiles/` directory and then run: + +```bash +docker-compose run --rm map generate_tiles +``` ## Original README diff --git a/run.sh b/run.sh index 6400f44..84820d9 100755 --- a/run.sh +++ b/run.sh @@ -199,5 +199,15 @@ if [ "$1" == "run" ]; then exit 0 fi +if [ "$1" == "generate_tiles" ]; then + + service postgresql start + service apache2 restart + + sudo -u renderer renderd -c /etc/renderd.conf + + cat /data/tiles/default/tiles.list | render_list --map default +fi + echo "invalid command" exit 1