Skip to content

Open Infrastructure Map, a view of infrastructure data in OpenStreetMap

Add expire script

Russ Garrettf4927c1accc5
diff --git a/util/expire.py b/util/expire.py
new file mode 100644
index 0000000..4f66d9a
--- /dev/null
+++ b/util/expire.py
@@ -0,0 +1,23 @@
+from pathlib import Path
+import subprocess
+import os
+
+pathlist = Path("/home/osm/imposm-expire").glob("**/*.tiles")
+for path in pathlist:
+ print(path)
+ subprocess.run(
+ [
+ "/home/osm/go/bin/tegola",
+ "cache",
+ "purge",
+ "--config",
+ "/home/osm/styles/config.toml",
+ "--max-zoom",
+ "17",
+ "--min-zoom",
+ "7",
+ "--tile-list",
+ path,
+ ]
+ )
+ os.remove(path)