Open Infrastructure Map, a view of infrastructure data in OpenStreetMap
Refactor docs
Russ Garrettcad53abadc2c
diff --git a/LICENSE b/LICENSEindex 588bfa2..c8f8dfb 100644--- a/LICENSE+++ b/LICENSE@@ -1,4 +1,4 @@-Copyright 2017-2018 Russ Garrett+Copyright Open Infrastructure Map contributorsRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:diff --git a/README.md b/README.mdindex 472871d..8035106 100644--- a/README.md+++ b/README.md@@ -11,51 +11,5 @@ We're aiming to make OpenInfraMap multilingual - if you can help translate, pleaAnyone can add a new language to Weblate - once the translation is more than 75% complete, please raise [an issue](https://github.com/openinframap/openinframap/issues) so we can enable it on the website.-## Web frontend--The [web frontend](web) contains the web app, written in TypeScript using Maplibre GL JS, and served as static files.--## Web backend--The [web backend](web-backend) serves the [stats pages](https://openinframap.org/stats), as well as-some additional non-JS web endpoints. It's an async python web app built using starlette.--## Database--The database runs [Postgres](https://www.postgresql.org/) with [PostGIS](https://postgis.net/) and-is populated from the OpenStreetMap replication feed by [Imposm 3](https://imposm.org/docs/imposm3/latest/).-[More info](./imposm)--Changes to the mapping require a re-import of the OpenStreetMap database, which takes-a while and is currently done very irregularly.--I will generally not make any changes to the mapping files unless I'm ready to run a re-import, so if you'd like some changes made to those, please raise an issue rather than a PR.--## Tile Server--Map tiles are served with [Tegola](https://tegola.io/). There's a YAML-based language-which generates the Tegola config, from the `tegola.yml` and `layers.yml` files:--`python3 ./tegola/generate_tegola_config.py ./tegola/tegola.yml ./tegola/layers.yml > ./tegola/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" --max-zoom 6 --overwrite --config /home/osm/styles/tegola/config.toml--Invalidated tiles are removed every minute:-- /usr/bin/python3 /home/osm/styles/tegola/expire.py /home/osm/imposm-expire--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+## Development+For details on how to develop Open Infrastructure Map, see the [architecture documentation](./docs/architecture.md).\ No newline at end of filediff --git a/docs/architecture.md b/docs/architecture.mdnew file mode 100644index 0000000..fdb24b4--- /dev/null+++ b/docs/architecture.md@@ -0,0 +1,40 @@+# Open Infrastructure Map Architecture++## Web frontend+The [web frontend](web) contains the web app, written in TypeScript using Maplibre GL JS, and served as static files. If you just want to develop the web frontend, this can be run alone, and will use other services from the production OpenInfraMap server.++## Web backend+The [web backend](web-backend) serves the [stats pages](https://openinframap.org/stats), as well as+some additional non-JS web endpoints. It's an async python web app built using starlette.++## Database+The database runs [Postgres](https://www.postgresql.org/) with [PostGIS](https://postgis.net/) and+is populated from the OpenStreetMap replication feed by [Imposm 3](https://imposm.org/docs/imposm3/latest/).+[More info](./imposm)++Changes to the mapping require a re-import of the OpenStreetMap database, which takes+a while and is currently done very irregularly.++I will generally not make any changes to the mapping files unless I'm ready to run a re-import, so if you'd like some changes made to those, please raise an issue rather than a PR.++## Tile server+Map tiles are served with [Tegola](https://tegola.io/).++[Tile server documentation](./tegola).++## Other 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" --max-zoom 6 --overwrite --config /home/osm/styles/tegola/config.toml++Invalidated tiles are removed by the [expire.py](tegola/expire.py) script, which also refreshes materialized views:++ /usr/bin/python3 /home/osm/styles/tegola/expire.py /home/osm/imposm-expire++Old diff files are removed periodically with:++ /usr/bin/find /home/osm/imposm_diff -type f -mtime +14 -exec rm {} \; > /dev/null