From 578f397e8a44288b0da7b02d45ce336a6aa23255 Mon Sep 17 00:00:00 2001 From: Pirmin Kalberer Date: Mon, 23 Oct 2023 14:30:27 +0200 Subject: [PATCH] Add more documentation --- README.md | 1 + bbox-asset-server/README.md | 30 ++++++++++++++++++++-- bbox-feature-server/README.md | 2 +- bbox-map-server/README.md | 41 ++++++++++++++++++++++++------ bbox-processes-server/README.md | 20 +++++++++++---- bbox-routing-server/README.md | 45 ++++++++++++++++++++++++++++++--- bbox-tile-server/README.md | 2 +- 7 files changed, 120 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index b611a5a1..0f4e7901 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Components: * [BBOX Tile server](bbox-tile-server): OGC API Tile service * [BBOX Asset server](bbox-asset-server): Serving static and templated files * [BBOX Processes server](bbox-processes-server): OGC API Processes service +* [BBOX Routing server](bbox-routing-server): OGC API Routing service (experimental) Features: * Built-in high performance HTTP server diff --git a/bbox-asset-server/README.md b/bbox-asset-server/README.md index bdb84a93..d4be2786 100644 --- a/bbox-asset-server/README.md +++ b/bbox-asset-server/README.md @@ -1,5 +1,4 @@ -BBOX Asset server -================= +# BBOX Asset server Serving static and templated files. @@ -8,3 +7,30 @@ Features: - [x] Serve fonts and other assets for Tile services - [x] QGIS plugin repository - [ ] Templates with inputs from path, arguments and configuration + + +## Configuration + +Static file serving: +```toml +[[assets.static]] +# ./assets/* -> http://localhost:8080/assets/ +dir = "./assets" +path = "/assets" +``` + +Template file serving: +```toml +[[assets.template]] +# ./templates/name.html -> http://localhost:8080/html/name/param +dir = "./templates" +path = "/html" +``` + +QGIS plugin repository: +```toml +[[assets.repo]] +# ./plugins/*.zip -> http://localhost:8080/qgisrepo/plugins.xml +dir = "./plugins" +path = "/qgisrepo" +``` diff --git a/bbox-feature-server/README.md b/bbox-feature-server/README.md index 93b8e4fb..ba4aeab5 100644 --- a/bbox-feature-server/README.md +++ b/bbox-feature-server/README.md @@ -6,7 +6,7 @@ Features: - [x] OGC API - Features - Part 1: Core 1.0 - [ ] OGC API - Features - Part 2: Coordinate Reference Systems by Reference 1.0 - [x] OpenAPI endpoint -- [x] Native backends: PostGIS, GeoPackage +- [x] Builtin storage backends: PostGIS, GeoPackage - [x] Output formats: GeoJSON diff --git a/bbox-map-server/README.md b/bbox-map-server/README.md index bacd6e22..85deaef3 100644 --- a/bbox-map-server/README.md +++ b/bbox-map-server/README.md @@ -1,17 +1,43 @@ -BBOX map server -=============== +# BBOX map server Asynchronous map server with FCGI backend. Features: - [x] OGC WMS 1.3 Server - [ ] OGC Map API Server -- [X] Map rendering backends: QGIS Server + UNN Mapserver +- [x] FCGI backends: + - [X] QGIS Server + - [X] UNN Mapserver - [ ] Instrumentation data for WMS backends - [ ] Intelligent process dispatching (slow query detection) -Usage ------ + +## Configuration + +Map server settings: +```toml +[mapserver] +# num_fcgi_processes = 4 # Default: number of CPU cores +# wait_timeout = 30000 # FCGI wait timeout in ms. Default: 90s +# search_projects = false # Scan directories and build inventory +``` + +QGIS Server settings: +```toml +[mapserver.qgis_backend] +project_basedir = "../assets" # Base dir for project files (.qgs, .qgz) +qgs.path = "/qgis" # WMS URL base path +qgz.path = "/qgz" # WMS URL base path +``` + +UMN MapServer settings: +```toml +[mapserver.umn_backend] +project_basedir = "../assets" # Base dir for project files (.map) +path = "/wms/map" # WMS URL base path +``` + +## Usage cd .. cargo run @@ -42,13 +68,12 @@ UMN Mapserver: curl -o /tmp/map.png 'http://127.0.0.1:8080/wms/map/ne?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=40.83354209954528358,0.542981257600549938,49.84069885574058389,15.5221558872974672&CRS=epsg:4326&WIDTH=1372&HEIGHT=825&LAYERS=country&STYLES=&FORMAT=image%2Fpng%3B%20mode%3D8bit' -Development ------------ +## Development Documentation of main libriaries: * Actix: https://actix.rs/ * Async Process: https://docs.rs/async-process/ -* QGIS Server plugins: https://docs.qgis.org/3.10/en/docs/user_manual/working_with_ogc/server/plugins.html +* QGIS Server plugins: https://docs.qgis.org/3.28/en/docs/server_manual/plugins.html Fast CGI: * Fast CGI: https://fastcgi-archives.github.io/FastCGI_Specification.html diff --git a/bbox-processes-server/README.md b/bbox-processes-server/README.md index e7ba98cd..2c097759 100644 --- a/bbox-processes-server/README.md +++ b/bbox-processes-server/README.md @@ -1,5 +1,4 @@ -BBOX Processes Service -====================== +# BBOX Processes Service The OGC API - Processes standard specifies an interface for executing computational tasks. @@ -9,11 +8,22 @@ Features: - [ ] OGC API - Processes - Part 1: Core - [x] Support synchronous and asynchronous process execution - [x] OpenAPI endpoint -- [x] [dagster](https://dagster.io/) backend +- [x] Multiple backend engines + - [x] [Dagster](https://dagster.io/) + - [ ] [Windmill](https://www.windmill.dev/) -Usage ------ +## Configuration + +Dagster Backend: +```toml +[processes.dagster_backend] +graphql_url = "http://localhost:3000/graphql" +repository_name = "the_repository" +repository_location_name = "the.repos" +``` + +## Usage ### Request examples diff --git a/bbox-routing-server/README.md b/bbox-routing-server/README.md index 20cb2514..117296ef 100644 --- a/bbox-routing-server/README.md +++ b/bbox-routing-server/README.md @@ -1,15 +1,52 @@ -BBOX Routing Service -==================== +# BBOX Routing Service Routing services with Contraction Hierarchy. Features: - [ ] OGC API - Routes - Part 1: Core -- [ ] OpenAPI endpoint -- [ ] GeoZero backend (PostGIS, GeoPackage, ...) +- Supported search APIs: + - [x] OGC API route requests + - [x] Basic from/to requests + - [x] Valhalla API compatible requests +- [x] Builtin storage backends: PostGIS, GeoPackage - [ ] Extract routing graphs from OSM planet files +## Configuration + +GeoPackage line geometry table: +```toml +[[routing.service]] +profile = "railway" +gpkg = "../assets/railway-test.gpkg" +table = "flows" +geom = "geom" + +PostGIS Edge/Vertices tables: +```toml +# Node search distance +search_dist = 0.01 +# Edge table +table = "rail_arcs" +# Node/Vertices table +node_table = "rail_arcs_vertices_pgr" +# Geometry column +geom = "geom" +# Node ID column in node table +node_id = "id" +# Cost column +cost = "cost" +# Column with source node ID +node_src = "source" +# Column with destination (target) node ID +node_dst = "target" +``` + +This assumes tables created e.g. with PgRouting `pgr_createTopology`. + +The contraction hierarchy is created on first startup and stored as cache files named `.graph.bin` and `.nodes.bin` + + Usage ----- diff --git a/bbox-tile-server/README.md b/bbox-tile-server/README.md index 26144bd3..851f68b5 100644 --- a/bbox-tile-server/README.md +++ b/bbox-tile-server/README.md @@ -12,7 +12,7 @@ Features: Tile seeder features: -- [ ] Parallelized seeding of raster and vector tiles +- [x] Parallelized seeding of raster and vector tiles - [x] Storage Backend: S3 - optimized for tile transfer - [x] Storage Backend: Local files