Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Reorganise files and improve readme

Russ Garrett8907cc9cb9e7
diff --git a/.gitignore b/.gitignore
index 654c791..c58f272 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
*.xml
*.mml
mapping.json
+config.toml
__pycache__
.mypy_cache
diff --git a/README.md b/README.md
index 1e6215b..5ebf4cc 100644
--- a/README.md
+++ b/README.md
@@ -5,4 +5,24 @@ The mapping file controls how the OSM subset is imported with
by calling `python3 ./mapping/main.py > ./mapping.json`.
The `layers.yml` file is used to generate the Tegola config using
-`python3 ./util/generate_tegola_config.py ./layers.yml > ./config.toml`.
+`python3 ./tegola/generate_tegola_config.py ./tegola/layers.yml > ./config.toml`.
+
+## Services
+
+Imposm runs as a service with the `-expiretiles-dir` option:
+
+ /usr/local/bin/imposm run -config /home/osm/imposm.json -expiretiles-dir /home/osm/imposm-expire
+
+The low-zoom layers are seeded daily with:
+
+ /usr/local/bin/tegola cache seed --bounds="-180,-85.0511,180,85.0511" --min-zoom 2 --max-zoom 6 --overwrite --config /home/osm/styles/config.toml
+
+Invalidated tiles are removed using `tegola/expire.py` which is run every minute.
+
+Materialised views are updated every 10 minutes with:
+
+ /usr/bin/psql -h 10.43.18.68 osm < /home/osm/styles/refresh_matviews.sql > /dev/null
+
+Old diff files are removed periodically with:
+
+ /usr/bin/find /home/osm/imposm_diff -type f -mtime +14 -exec rm {} \; > /dev/null
diff --git a/refresh_matviews.sql b/schema/refresh_matviews.sql
similarity index 100%
rename from refresh_matviews.sql
rename to schema/refresh_matviews.sql
diff --git a/util/expire.py b/tegola/expire.py
similarity index 100%
rename from util/expire.py
rename to tegola/expire.py
diff --git a/util/generate_tegola_config.py b/tegola/generate_tegola_config.py
similarity index 100%
rename from util/generate_tegola_config.py
rename to tegola/generate_tegola_config.py
diff --git a/layers.yml b/tegola/layers.yml
similarity index 100%
rename from layers.yml
rename to tegola/layers.yml