### Setup .env file for Docker Compose Source: https://github.com/bbox-services/bbox/blob/main/docker/bbox/README.md Copies the template environment file and appends generated passwords for PostgreSQL and Authentik. Ensure you have `pwgen` installed. ```bash cp template.env .env echo "PG_PASS=$(pwgen -s 40 1)" >> .env echo "AUTHENTIK_SECRET_KEY=$(pwgen -s 50 1)" >> .env ``` -------------------------------- ### Start Database and Serve Tiles Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Starts the local database and then runs the tile server, typically used when PostGIS is the data source. ```bash just start-db just serve ``` -------------------------------- ### Start Database for Benchmarks Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Starts the database required for certain benchmarking operations. ```bash just start-db ``` -------------------------------- ### Start MinIO Server Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Starts the MinIO local S3 compatible storage server. Access the console at http://localhost:9001. ```bash just start-minio ``` -------------------------------- ### Setup MinIO Bucket Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Configures the necessary bucket within the MinIO server for testing. ```bash just setup-minio ``` -------------------------------- ### Get Project Settings (QGIS Server) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a curl request to retrieve project settings from the QGIS Server backend. ```bash curl -s 'http://127.0.0.1:8080/qgis/helloworld?SERVICE=WMS&REQUEST=GetProjectSettings' ``` -------------------------------- ### BBOX Server Configuration Example Source: https://github.com/bbox-services/bbox/blob/main/bbox-server/README.md Example TOML configuration for the BBOX server, including webserver, static asset serving, QGIS plugin repository, mapserver settings, and metrics endpoints. ```toml [webserver] # Web server settings # Environment variable prefix: BBOX_WEBSERVER__ # server_addr = "127.0.0.1:8080" # Default: 127.0.0.1:8080 # worker_threads = 4 # Default: number of CPU cores [[assets.static]] # Static file serving # Env var example: BBOX_ASSETS__STATIC='[{dir="assets",path="assets"}]' # ./assets/* -> http://localhost:8080/assets/ # dir = "./assets" # path = "/assets" [[assets.repo]] # QGIS plugin repository # Env var example: BBOX_ASSETS__REPO='[{dir="plugins",path="qgis"}]' # ./plugins/*.zip -> http://localhost:8080/qgis/plugins.xml # dir = "./plugins" # path = "qgis" [mapserver] # Map server settings # Environment variable prefix: BBOX_MAPSERVER__ path = "/wms" # Base path of WMS endpoints # num_fcgi_processes = 4 # Default: number of CPU cores # fcgi_client_pool_size = 1 # FCGI client pool size. Default: 1 search_projects = false # Scan directories and build inventory [mapserver.qgis] # QGIS Server settings # Environment variable prefix: BBOX_MAPSERVER__QGIS_BACKEND__ # project_basedir = "." # Base dir for project files (.qgs, .qgz) [mapserver.umn] # UMN MapServer settings # Environment variable prefix: BBOX_MAPSERVER__UMN_BACKEND__ # project_basedir = "." # Base dir for project files (.map) [mapserver.mock] # Enable FCGI mockup backend (for testing) # Environment variable prefix: BBOX_MAPSERVER__MOCK_BACKEND__ [metrics.prometheus] # Prometheus metrics endpoint # Environment variable prefix: BBOX_METRICS__PROMETHEUS__ path = "/metrics" [metrics.jaeger] # Jaeger tracing # Environment variable prefix: BBOX_METRICS__JAEGER__ agent_endpoint = "localhost:6831" ``` -------------------------------- ### Get WFS Capabilities (QGIS Server) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a curl request to retrieve WFS capabilities from the QGIS Server backend. ```bash curl -s 'http://127.0.0.1:8080/qgis/ne?SERVICE=WFS&REQUEST=GetCapabilities' ``` -------------------------------- ### Install BBOX Server Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/mock-fcgi-wms/README.md Install the BBOX server using Cargo. This command is used when integrating the mock server with the BBOX server. ```bash cargo install --path . ``` -------------------------------- ### Run BBOX Tile Server with Configuration Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Starts the BBOX tile server using a bbox.toml configuration file. Useful for testing with reduced log output. ```bash export BBOX_MAPSERVER__NUM_FCGI_PROCESSES=1 cargo run serve ``` -------------------------------- ### Run BBOX Map Server Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Navigate to the project directory and run the cargo command to start the map server. ```bash cd .. cargo run ``` -------------------------------- ### Install BBOX Tile Server with Cargo Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/installation.md Installs the BBOX tile server using the Cargo package manager. Ensure you have Rust installed. The `--locked` flag ensures reproducible builds. ```shell cargo install bbox-tile-server --locked ``` ```shell # or cargo binstall bbox-tile-server ``` ```shell bbox-tile-server --help ``` -------------------------------- ### Basic From/To Route Request Source: https://github.com/bbox-services/bbox/blob/main/bbox-routing-server/README.md Example of a basic GET request to retrieve a route between two points using specified parameters. ```bash curl -s 'http://localhost:8080/routes/basic?profile=railway&from_pos=9.35213353,47.0935012&to_pos=9.3422712,47.1011887' ``` -------------------------------- ### Run BBOX Asset Server Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/asset-server/_index.md Starts the BBOX Asset Server using a TOML configuration file. Ensure `bbox.toml` is present in the current directory. ```bash bbox-asset-server serve ``` -------------------------------- ### Run BBOX Routing Server Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/routing-server/_index.md Starts the BBOX routing server using a specified configuration file. Ensure the bbox.toml file is correctly set up. ```bash bbox-routing-server serve ``` -------------------------------- ### Run BBOX Server Source: https://github.com/bbox-services/bbox/blob/main/bbox-server/README.md Start the BBOX server. Access the built-in Swagger UI or an external Swagger editor via the provided URLs. ```bash cargo run ``` -------------------------------- ### Start Authentik Authentication Service Source: https://github.com/bbox-services/bbox/blob/main/docker/bbox/README.md Launches the Authentik authentication service. Access the Authentik UI at http://127.0.0.1:9000/ with default credentials. ```bash docker-compose --profile auth up -d ``` -------------------------------- ### Run BBOX Processes Server Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/processes-server/_index.md Starts the BBOX Processes server using the specified configuration file. ```bash bbox-processes-server serve ``` -------------------------------- ### Get WMS Capabilities (QGIS Server) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a curl request to retrieve WMS capabilities from the QGIS Server backend. ```bash curl -s 'http://127.0.0.1:8080/qgis/ne?SERVICE=WMS&REQUEST=GetCapabilities' ``` -------------------------------- ### Run BBOX Tile Server with MBTiles Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Starts the BBOX tile server and serves tiles directly from an MBTiles file. ```bash cargo run -- serve ../assets/liechtenstein.mbtiles ``` -------------------------------- ### Install BBOX Server with Cargo Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/installation.md Use this command to install the BBOX server directly from crates.io. The --locked flag ensures reproducible builds. Alternatively, `cargo binstall` can be used for a potentially faster installation. ```shell cargo install bbox-server --locked ``` ```shell cargo binstall bbox-server ``` ```shell bbox-server --help ``` -------------------------------- ### POST Request Example for Printing Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/map-server/endpoints.md Example of making a POST request to the WMS endpoint for printing functionality. ```APIDOC ## POST /{prefix}/{project} ### Description This endpoint can handle POST requests, specifically demonstrated for the `GetPrint` WMS request, allowing for the generation of print outputs like PDFs. ### Method POST ### Endpoint `/{prefix}/{project}` ### Parameters #### Path Parameters - **prefix** (string) - Required - The prefix defining the backend service (e.g., `qgis`). - **project** (string) - Required - The name of the project or map configuration. #### Request Body The request body should contain WMS parameters for the `GetPrint` request, including format, template, DPI, CRS, and map extent details. ### Request Example ```bash curl -o /tmp/print.pdf 'http://127.0.0.1:8080/qgis/helloworld' -X POST \ -d 'SERVICE=WMS&VERSION=1.3.0&REQUEST=GetPrint&FORMAT=pdf' \ -d 'TEMPLATE=Composer 1&DPI=300&CRS=EPSG:4326' \ -d 'map0:LAYERS=Country,Hello&map0:extent=-92.8913,-185.227,121.09,191.872' ``` ### Response #### Success Response (200) Returns the requested print output, such as a PDF file. #### Response Example ```json { "example": "PDF file content" } ``` ``` -------------------------------- ### Get Print Output (QGIS Server) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a POST curl request to generate a print output (PDF) from the QGIS Server backend. ```bash curl -o /tmp/print.pdf 'http://127.0.0.1:8080/qgis/helloworld' -X POST \ -d 'SERVICE=WMS&VERSION=1.3.0&REQUEST=GetPrint&FORMAT=pdf' \ -d 'TEMPLATE=Composer 1&DPI=300&CRS=EPSG:4326' \ -d 'map0:LAYERS=Country,Hello&map0:extent=-92.8913,-185.227,121.09,191.872' ``` -------------------------------- ### Zurich to Munich Route Request Source: https://github.com/bbox-services/bbox/blob/main/bbox-routing-server/README.md Example of a basic GET request to find a route between Zurich and Munich. ```bash curl -s 'http://localhost:8080/routes/basic?profile=railway&from_pos=8.53636,47.37726&to_pos=11.56096,48.14019' ``` -------------------------------- ### BBOX Server Serve Command Options Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/running.md Shows the specific options for the 'serve' subcommand of bbox-server. This is used to start the service and specify the data source. ```shell Usage: bbox-server serve [FILE_OR_URL] Arguments: [FILE_OR_URL] Serve service from file or URL Options: -h, --help Print help ``` -------------------------------- ### Run Mock FCGI WMS Standalone (Unix Socket) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/mock-fcgi-wms/README.md Start the mock FCGI WMS server using spawn-fcgi with a Unix socket. This is for standalone testing. ```bash spawn-fcgi ../../target/debug/mock-fcgi-wms -n -s /tmp/mock-fcgi cgi-fcgi -bind -connect /tmp/mock-fcgi ``` -------------------------------- ### Get WMS Capabilities (UMN Mapserver) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a curl request to retrieve WMS capabilities from the UMN Mapserver backend. ```bash curl -s 'http://127.0.0.1:8080/wms/map/ne?SERVICE=WMS&REQUEST=GetCapabilities' ``` -------------------------------- ### OGC API Route Request Example Source: https://github.com/bbox-services/bbox/blob/main/bbox-routing-server/README.md Example of a POST request to the OGC API - Routes endpoint for a synchronous route calculation. ```bash curl -s -X 'POST' \ 'http://localhost:8080/routes?mode=sync' \ -H 'accept: application/geo+json' \ -H 'Content-Type: application/json' \ -d '{ \ "name": "Route from A to B", \ "waypoints": { \ "type": "MultiPoint", \ "coordinates": [ \ [9.35213353, 47.0935012], \ [9.3422712, 47.1011887] \ ] \ }, \ "preference": "fastest", \ "dataset": "OSM" \ }' ``` -------------------------------- ### Get Feature (QGIS Server) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a curl request to retrieve feature data from the QGIS Server backend using WFS. ```bash curl -s 'http://127.0.0.1:8080/qgis/ne?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&TYPENAME=country&SRSNAME=EPSG:3857&BBOX=1059483.34824404888786376,5959680.16110791172832251,1061700.73825845750980079,5962445.67000228632241488,EPSG:3857' ``` -------------------------------- ### Run BBOX Server with Docker and Config Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/running.md Starts the BBOX server in Docker, mounting both a configuration file and an assets directory. This allows custom configurations and access to local assets. ```shell docker run -p 8080:8080 -v $PWD/bbox.toml:/var/www/bbox.toml:ro -v $PWD/assets:/var/www/assets:ro sourcepole/bbox-server-qgis ``` -------------------------------- ### Run Prometheus Docker Container Source: https://github.com/bbox-services/bbox/blob/main/bbox-server/README.md Start a Prometheus instance using Docker. Mount a local configuration file for Prometheus. ```bash docker run --rm -p 127.0.0.1:9090:9090 -v $PWD/instrumentation/prometheus.yml:/etc/prometheus/prometheus.yml:ro prom/prometheus ``` -------------------------------- ### Prometheus Expression Example Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/instrumentation.md An example of a metric query in Prometheus. ```promql http_requests_duration_bucket ``` -------------------------------- ### Start Default BBOX Services Source: https://github.com/bbox-services/bbox/blob/main/docker/bbox/README.md Launches the default set of BBOX services using Docker Compose. Access the BBOX UI at http://127.0.0.1:8080/. ```bash docker-compose --profile default up -d ``` -------------------------------- ### Get Map Image (QGIS Server) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a curl request to fetch a map image in PNG format from the QGIS Server backend. ```bash curl -o /tmp/map.png 'http://127.0.0.1:8080/qgis/ne?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-20037508.34278924391,-5966981.031407224014,19750246.20310878009,17477263.06060761213&CRS=EPSG:900913&WIDTH=1399&HEIGHT=824&LAYERS=country&STYLES=&FORMAT=image/png;%20mode%3D8bit' ``` -------------------------------- ### Prometheus Expression Example Source: https://github.com/bbox-services/bbox/blob/main/bbox-server/README.md An example PromQL query to retrieve HTTP request duration buckets. ```promql http_requests_duration_bucket ``` -------------------------------- ### Open Maplibre Viewer for PostGIS Tileset Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/endpoints.md Launch a MapLibre viewer in the browser, configured to display tiles from a PostGIS-backed tileset. This example assumes a default style is available. ```bash x-www-browser http://localhost:8080/html/maplibre/ne_countries ``` -------------------------------- ### Run Mock FCGI WMS Standalone (TCP Port) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/mock-fcgi-wms/README.md Start the mock FCGI WMS server using spawn-fcgi on a TCP port. This allows remote connections. ```bash spawn-fcgi ../../target/debug/mock-fcgi-wms -n -p 8099 QUERY_STRING='' cgi-fcgi -bind -connect 127.0.0.1:8099 ``` -------------------------------- ### Start Instrumentation Services Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/mock-fcgi-wms/README.md Start Jaeger, Prometheus, and Grafana using Docker Compose. These services are used for monitoring and tracing the BBOX server. ```bash cd ../../docker/bbox docker compose up -d jaeger prometheus grafana ``` -------------------------------- ### Get Map Image (UMN Mapserver) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a curl request to fetch a map image in PNG format from the UMN Mapserver backend. ```bash 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' ``` -------------------------------- ### Run Grafana Docker Container Source: https://github.com/bbox-services/bbox/blob/main/bbox-server/README.md Start a Grafana instance using Docker to visualize metrics and traces. ```bash docker run -rm -p 127.0.0.1:3000:3000 grafana/grafana ``` -------------------------------- ### Run BBOX Tile Server with Auto Discovery Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/_index.md Start the BBOX tile server with auto-discovery enabled, pointing to a specific tile archive. This is useful for serving tiles directly from an MBTiles file. ```bash bbox-tile-server serve ../assets/liechtenstein.mbtiles ``` -------------------------------- ### Start Windmill Process Orchestration Service Source: https://github.com/bbox-services/bbox/blob/main/docker/bbox/README.md Launches the Windmill service for process orchestration. Access the Windmill UI at http://127.0.0.1:8000/ with provided credentials. ```bash docker-compose --profile processes up -d ``` -------------------------------- ### WFS Transaction (QGIS Server) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a POST curl request to perform a WFS transaction (e.g., add data) to the QGIS Server backend. ```bash curl -s --data @wfsadd.xml 'http://127.0.0.1:8080/qgis/ne?SERVICE=WFS&REQUEST=Transaction' ``` -------------------------------- ### Run PostGIS Service Container Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/endpoints.md Start a Docker container for a PostGIS database, commonly used as a backend for tile services. This command maps the container's port 5432 to the host's 5439. ```bash docker run -p 127.0.0.1:5439:5432 -d --name mvtbenchdb --rm sourcepole/mvtbenchdb ``` -------------------------------- ### Serve BBOX Feature Server with Default Configuration Source: https://github.com/bbox-services/bbox/blob/main/bbox-feature-server/README.md Run the feature server using the default bbox.toml configuration file. ```bash cargo run serve ``` -------------------------------- ### Get OGC API Entry Points Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Retrieves the root OGC API entry points, typically used for discovering available services and resources. ```bash curl -s -H 'Accept: application/json' http://localhost:8080/ | jq . ``` -------------------------------- ### Get Legend Graphic (QGIS Server) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/README.md Example of a curl request to obtain a legend graphic for a layer from the QGIS Server backend. ```bash curl -o /tmp/legend.png 'http://127.0.0.1:8080/qgis/ne?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetLegendGraphic&LAYER=country&FORMAT=image/png&STYLE=default&TRANSPARENT=true' ``` -------------------------------- ### Run BBOX Server with Docker Source: https://github.com/bbox-services/bbox/blob/main/README.md This command runs the BBOX server using Docker, exposing port 8080. Ensure you have Docker installed and the image pulled. ```bash docker run -p 8080:8080 sourcepole/bbox-server-qgis ``` -------------------------------- ### QGIS Server Backend Configuration Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/map-server/configuration.md Set up the base directory for QGIS project files and define URL paths for accessing .qgs and .qgz files. ```toml [mapserver.qgis_backend] project_basedir = "./projects" # Base dir for project files (.qgs, .qgz) qgs.path = "/qgis" # URL base path *.qgs qgz.path = "/qgz" # URL base path *.qgz ``` -------------------------------- ### Configure QGIS Plugin Repository Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/asset-server/configuration.md Set up a local directory to serve as a QGIS plugin repository, making plugins available via a specific URL path. The 'dir' is relative to the configuration file. ```toml [[assets.repo]] # ./plugins/*.zip -> http://localhost:8080/qgisrepo/plugins.xml dir = "plugins" path = "/qgisrepo" ``` -------------------------------- ### Serve BBOX Feature Server with Custom Configuration Source: https://github.com/bbox-services/bbox/blob/main/bbox-feature-server/README.md Run the feature server using a custom TOML configuration file, specified with the --config flag. ```bash cargo run -- --config=bbox-pg.toml serve ``` -------------------------------- ### Run BBOX Server Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/mock-fcgi-wms/README.md Run the BBOX server in release mode with a specified configuration file. Enable INFO level logging for visibility. ```bash cd .. RUST_LOG=info cargo run --release -- --config=./bench/bbox-bench.toml serve ``` -------------------------------- ### Get Job Results Source: https://github.com/bbox-services/bbox/blob/main/bbox-processes-server/README.md Retrieves the results of a completed job. ```APIDOC ## Get Job Results ### Description Retrieves the results of a completed job. ### Method GET ### Endpoint /jobs/{job_id}/results ### Parameters #### Path Parameters - **job_id** (string) - Required - The unique identifier of the job. ``` -------------------------------- ### BBOX Tile Server Serve Command Usage Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/running.md Shows the usage for the 'serve' command, which runs the tile server. It accepts an optional file or URL to serve tiles from. ```shell Usage: bbox-tile-server serve [FILE_OR_URL] Arguments: [FILE_OR_URL] Serve service from file or URL Options: -h, --help Print help ``` -------------------------------- ### Get Single Item Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/feature-server/endpoints.md Retrieves a single item by its ID from a specified collection. ```APIDOC ## GET /collections/{name}/items/{id} ### Description Retrieves a single item by its ID from a specified collection. ### Method GET ### Endpoint /collections/{name}/items/{id} ### Parameters #### Path Parameters - **name** (string) - Required - The name of the collection. - **id** (string) - Required - The ID of the item to retrieve. ### Request Example ```bash curl -s http://127.0.0.1:8080/collections/populated_places_names/items/2 | jq . ``` ### Response #### Success Response (200) - **item** (object) - The requested item. ``` -------------------------------- ### Get Job Status Source: https://github.com/bbox-services/bbox/blob/main/bbox-processes-server/README.md Retrieves the current status of a previously submitted job. ```APIDOC ## Get Job Status ### Description Retrieves the current status of a previously submitted job. ### Method GET ### Endpoint /jobs/{job_id} ### Parameters #### Path Parameters - **job_id** (string) - Required - The unique identifier of the job. ``` -------------------------------- ### Configure Template File Serving Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/asset-server/configuration.md Serve template files, mapping local template directories to URL paths for rendering. The 'dir' is relative to the configuration file. ```toml [[assets.template]] # ./templates/name.html -> http://localhost:8080/html/name/param dir = "templates" path = "/html" ``` -------------------------------- ### Build Release Version Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Compiles the BBOX tile server in release mode, optimizing for performance. ```bash cargo build --release ``` -------------------------------- ### Serve Tiles from File using Docker Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/running.md Runs the BBOX server in a Docker container and serves tiles from a local MBTiles file. Mounts the local assets directory into the container. ```shell docker run -p 8080:8080 -v $PWD/assets:/assets:ro sourcepole/bbox-server-qgis bbox-server serve /assets/liechtenstein.mbtiles ``` -------------------------------- ### Run Jaeger Docker Container Source: https://github.com/bbox-services/bbox/blob/main/bbox-server/README.md Start a Jaeger all-in-one Docker container in detached mode for distributed tracing. ```bash docker run --rm -d -p 6831:6831/udp -p 6832:6832/udp -p 16686:16686 jaegertracing/all-in-one:latest ``` -------------------------------- ### Tile Seeding Benchmarks Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Runs various tile seeding benchmarks: from files, MBTiles, and PMTiles. ```bash just seed-bench-files just seed-bench-mbtiles just seed-bench-pmtiles ``` -------------------------------- ### WMS Endpoint Request Duration Sum Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/instrumentation.md PromQL query to get the sum of request durations specifically for the WMS endpoint. ```promql http_requests_duration_sum{endpoint="/qgis/{project:.+}"} ``` -------------------------------- ### PostGIS Query with Runtime Parameter Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/configuration.md Example of a PostGIS SQL query that uses a custom runtime parameter '!date!'. The parameter is passed via the URL. ```toml sql = """ SELECT id, date, ST_Point(lon, lat, 4326) AS geom FROM gpslog WHERE date = !date! """ ``` -------------------------------- ### General Map Server Settings Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/map-server/configuration.md Configure general map server parameters like the number of FastCGI processes, wait timeout, and project scanning behavior. ```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 ``` -------------------------------- ### List Available Processes Source: https://github.com/bbox-services/bbox/blob/main/bbox-processes-server/README.md Use this command to retrieve a list of all available processes supported by the service. ```bash curl http://localhost:8080/processes ``` -------------------------------- ### Configure Static File Serving Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/asset-server/configuration.md Serve static files from a local directory under a specific URL path. The 'dir' is relative to the configuration file. ```toml [[assets.static]] # ./assets/* -> http://localhost:8080/assets/ dir = "assets" # Relative to configuration file path = "/assets" ``` -------------------------------- ### Configure Webserver Settings Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/core/configuration.md Define web server settings in bbox.toml. Environment variables can override these settings using the BBOX_WEBSERVER__ prefix. Available log levels include Error, Warn, Info, Debug, and Trace. ```toml [webserver] # Web server settings # Environment variable prefix: BBOX_WEBSERVER__ server_addr = "0.0.0.0:8080" # Default: 127.0.0.1:8080 # worker_threads = 4 # Default: number of CPU cores loglevel = "Info" # Error, Warn, Info, Debug, Trace ``` -------------------------------- ### Run BBOX Server with Configuration File using Docker Source: https://github.com/bbox-services/bbox/blob/main/README.md This command runs the BBOX server with a custom TOML configuration file and maps local assets. It mounts the configuration file and assets directory into the container. ```bash docker run -p 8080:8080 -v $PWD/bbox.toml:/var/www/bbox.toml:ro -v $PWD/assets:/assets:ro sourcepole/bbox-server-qgis ``` -------------------------------- ### Get Job Results Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/processes-server/endpoints.md Fetch the results of a completed asynchronous job. This endpoint requires the job ID and should be called after confirming the job has finished successfully. ```bash JOBID=386f6c55-d718-4160-b4df-afc5ad5c7a73 curl http://localhost:8080/jobs/$JOBID/results ``` -------------------------------- ### Open Maputnik Editor with Dynamic Style Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Opens the Maputnik style editor, dynamically loading the style JSON from the tile server. ```bash http://localhost:8080/assets/maputnik/index.html?style=http://localhost:8080/xyz/mbtiles_mvt_fl.style.json ``` -------------------------------- ### BBOX Server Command Line Options Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/running.md Displays the available commands and options for the bbox-server executable. Use this to understand the main subcommands like serve, seed, upload, and help. ```shell Usage: bbox-server [OPTIONS] Commands: serve Run service seed Seed tiles upload Upload tiles help Print this message or the help of the given subcommand(s) Options: -c, --config Config file (Default: bbox.toml) --loglevel Log level (Default: info) [possible values: error, warn, info, debug, trace] -t, --t-rex-config T-Rex config file -h, --help Print help ``` -------------------------------- ### Get OGC API OpenAPI Specification Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Fetches the OpenAPI (Swagger) specification for the OGC API, useful for understanding the API structure and available endpoints. ```bash curl -s http://localhost:8080/openapi.json | jq . ``` -------------------------------- ### Build Mock FCGI WMS Server Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/mock-fcgi-wms/README.md Build the mock FCGI WMS server using Cargo. This command compiles the Rust project. ```bash cargo build ``` -------------------------------- ### MVT Benchmark Seeding Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Initiates seeding benchmarks using mvtbench. Requires S3 environment variables to be set. ```bash just seed-s3 ``` -------------------------------- ### Open Map Viewer with PostGIS Style Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Opens a map viewer using a style JSON sourced from a PostGIS tile service. ```bash x-www-browser http://localhost:8080/assets/maplibre.html?style=/xyz/ne_countries.style.json ``` -------------------------------- ### Run BBOX Server with Docker Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/installation.md This command launches the BBOX server using a Docker container. It maps ports, mounts configuration and asset directories from the host, and runs the container as the current user. Ensure `bbox.toml` and `assets` exist in the current directory. ```shell docker run --rm --user=$UID -p 8080:8080 -v $PWD/bbox.toml:/bbox.toml:ro -v $PWD/assets:/assets:ro sourcepole/bbox-server-qgis:v0.6.2 ``` -------------------------------- ### Get Job Status Source: https://github.com/bbox-services/bbox/blob/main/bbox-processes-server/README.md Check the status of an asynchronous job using its unique JOBID. Replace $JOBID with the actual ID returned after initiating the asynchronous process. ```bash JOBID=386f6c55-d718-4160-b4df-afc5ad5c7a73 curl http://localhost:8080/jobs/$JOBID ``` -------------------------------- ### Serve Tiles from File with Docker Source: https://github.com/bbox-services/bbox/blob/main/README.md This command serves tiles from a local MBTiles file using Docker. It maps the local assets directory to the container and specifies the MBTiles file for serving. ```bash docker run -p 8080:8080 -v $PWD/assets:/assets:ro sourcepole/bbox-server-qgis bbox-server serve /assets/liechtenstein.mbtiles ``` -------------------------------- ### Execute Asynchronous Process Source: https://github.com/bbox-services/bbox/blob/main/bbox-processes-server/README.md Initiate an asynchronous process execution by including the 'Prefer: respond-async' header. The server will return immediately with a job status. ```bash curl --header "Content-Type: application/json" \ --header "Prefer: respond-async" \ --request POST \ --data '{"inputs": ["2"]}' \ http://localhost:8080/processes/sleep/execution ``` -------------------------------- ### Open Map Viewer with Debug Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Opens a local map viewer in the browser with debugging enabled, useful for inspecting tile server behavior. ```bash x-www-browser http://127.0.0.1:8080/assets/usergrid.html?debug=1 ``` -------------------------------- ### Inspect Collections via Browser Source: https://github.com/bbox-services/bbox/blob/main/bbox-feature-server/README.md Open a web browser to inspect the available collections served by the API. ```bash x-www-browser http://127.0.0.1:8080/collections ``` -------------------------------- ### Raster Tile Layer Configuration Source: https://github.com/bbox-services/bbox/blob/main/assets/usergrid.html Sets up a custom raster tile layer using XYZ tile URLs, referencing the custom tile grid and projection. ```javascript var rasterTileLayer = new ol.layer.Tile({ source: new ol.source.XYZ({ url: servername + '/map/tiles/LV95/{z}/{x}/{y}', // url: servername + '/xyz/rivers_lakes/{z}/{x}/{y}.png', tileGrid: tileGrid, projection: projection, }) }); ``` -------------------------------- ### Initialize MapLibre Map with Custom Style Source: https://github.com/bbox-services/bbox/blob/main/templates/maplibre-asset-style.html Use this snippet to create a new MapLibre map instance. Ensure the 'maplibregl' library is loaded and the container element exists. The style URL can be dynamically set. ```javascript var map = new maplibregl.Map({ container: 'map', style: location.origin + '/assets/{{ param }}-style.json' }); ``` -------------------------------- ### Request MVT Tile from MBTiles Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Fetches an MVT tile from a server configured to serve an MBTiles file. ```bash curl -o /tmp/tile.mvt http://localhost:8080/xyz/liechtenstein/14/8621/5759.mvt ``` -------------------------------- ### Request MVT Tile from PostGIS Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Fetches an MVT tile from a server configured to serve tiles from PostGIS. ```bash curl -o /tmp/tile.mvt http://localhost:8080/xyz/ne_countries/2/2/2.mvt ``` -------------------------------- ### Execute Synchronous Process with Simple Input Source: https://github.com/bbox-services/bbox/blob/main/bbox-processes-server/README.md Execute a process synchronously by sending a POST request with a JSON payload containing the process ID and its inputs. ```bash curl --header "Content-Type: application/json" \ --request POST \ --data '{"inputs": ["bbox"]}' \ http://localhost:8080/processes/hello/execution ``` -------------------------------- ### Custom Tile Grid Configuration Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/configuration.md Defines a custom tile grid using a JSON file. ```toml [[grid]] json = "assets/custom-grid-lv95.json" ``` -------------------------------- ### Execute Process with File Upload (Multipart) Source: https://github.com/bbox-services/bbox/blob/main/bbox-processes-server/README.md Upload a file along with JSON input data using multipart/form-data encoding. The file is specified with -F and the JSON payload with -F 'json=...;type=application/json'. ```bash curl -F file=@./Cargo.toml \ -F 'json={"inputs": ["bbox"]};type=application/json' \ http://localhost:8080/processes/upload/execution_multipart ``` -------------------------------- ### BBOX Tile Server General Usage Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/running.md Displays the general usage and available commands for the BBOX tile server. Use this to understand the main functionalities like serve, seed, upload, and help. ```shell Usage: bbox-tile-server [OPTIONS] Commands: serve Run service seed Seed tiles upload Upload tiles help Print this message or the help of the given subcommand(s) Options: -c, --config Config file (Default: bbox.toml) --loglevel Log level (Default: info) [possible values: error, warn, info, debug, trace] -t, --t-rex-config T-Rex config file -h, --help Print help ``` -------------------------------- ### Open Maputnik Editor with Local Style Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Opens the Maputnik style editor in a web browser, loading a local style JSON file. ```bash http://localhost:8080/assets/maputnik/index.html?style=http://localhost:8080/assets/maplibre-style.json ``` -------------------------------- ### Request PNG Tile Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Fetches a PNG tile from the server for a specific tileset and zoom level. ```bash curl -o /tmp/tile.png http://localhost:8080/xyz/ne_extracts/2/2/2.png ``` -------------------------------- ### Datasource Configuration Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/configuration.md Defines data sources for the tile server. Supports PostGIS and WMS proxy configurations. ```toml [[datasource]] name = "mvtbenchdb" [datasource.postgis] url = "postgresql://mvtbench:mvtbench@127.0.0.1:5439/mvtbench" [[datasource]] name = "gebco" [datasource.wms_proxy] baseurl = "https://wms.gebco.net/mapserv?version=1.3.0" format = "image/jpeg" ``` -------------------------------- ### Configure Dagster Backend Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/processes-server/configuration.md Set up the connection details for the Dagster backend, including the GraphQL endpoint and repository information. ```toml [processes.dagster_backend] graphql_url = "http://localhost:3000/graphql" repository_name = "the_repository" repository_location_name = "the.repos" ``` -------------------------------- ### List Processes Source: https://github.com/bbox-services/bbox/blob/main/bbox-processes-server/README.md Retrieves a list of all available processes that can be executed. ```APIDOC ## List Processes ### Description Retrieves a list of all available processes that can be executed. ### Method GET ### Endpoint /processes ``` -------------------------------- ### Open Jaeger UI Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/mock-fcgi-wms/README.md Open the Jaeger UI in a web browser to view distributed traces. Access it via the provided URL. ```bash open http://localhost:16686/ ``` -------------------------------- ### Configure PostGIS Datasource Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/feature-server/configuration.md Define a PostGIS datasource by specifying its name and connection URL. ```toml [[datasource]] name = "mvtbenchdb" [datasource.postgis] url = "postgresql://mvtbench:mvtbench@127.0.0.1:5439/mvtbench" ``` -------------------------------- ### Configure Custom Tile Grid Source: https://github.com/bbox-services/bbox/blob/main/assets/usergrid.html Sets up a custom WMTS tile grid using the defined extent, resolutions, and matrix IDs. ```javascript var matrixIds = []; for (var i = 0; i < RESOLUTIONS.length; i++) { matrixIds.push(i); } var tileGrid = new ol.tilegrid.WMTS({ origin: [extent[0], extent[3]], resolutions: RESOLUTIONS, matrixIds: matrixIds }); ``` -------------------------------- ### Access BBOX Server UI Source: https://github.com/bbox-services/bbox/blob/main/bbox-server/README.md Open the BBOX server in a web browser. The built-in Swagger UI and an external Swagger editor link are provided. ```bash x-www-browser http://127.0.0.1:8080/ ``` -------------------------------- ### Request JPG Tile Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Fetches a JPG tile from the server for a specific tileset and zoom level. ```bash curl -o /tmp/tile.jpg http://localhost:8080/xyz/gebco/0/0/0.jpeg ``` -------------------------------- ### BBOX Tile Server Sequential Upload Benchmark Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Measures the time for sequential tile uploads to S3 using the bbox-tile-server. Requires S3_ENDPOINT_URL to be set. ```bash export S3_ENDPOINT_URL="http://localhost:9000" cargo build --release time ../target/release/bbox-tile-server upload --srcdir=/home/pi/code/gis/vogeldatenbank/tiles/ --s3-path=s3://tiles ``` -------------------------------- ### Raster Tiles from QGIS Server Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/configuration.md Configures a tileset to serve raster tiles from a QGIS Server backend. Specifies project, suffix, and layers. ```toml [[tileset]] name = "ne_extracts" map_service = { project = "ne_extracts", suffix = "qgz", layers = "ne_extracts" } cache = "tilecache" ``` -------------------------------- ### List Available Processes Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/processes-server/endpoints.md Retrieves a list of all available processes that can be executed via the BBOX API. ```APIDOC ## GET /processes ### Description Lists all available processes. ### Method GET ### Endpoint /processes ``` -------------------------------- ### Access Prometheus UI Source: https://github.com/bbox-services/bbox/blob/main/bbox-server/README.md Open the Prometheus web interface in a browser to test expressions and monitor metrics. ```bash x-www-browser http://localhost:9090/ ``` -------------------------------- ### Open Maputnik Editor with Zoom and Coordinates Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Opens the Maputnik style editor and navigates to a specific zoom level and geographic coordinates. ```bash http://localhost:8080/assets/maputnik/index.html#11.0/47.0944/9.5076 ``` -------------------------------- ### S3 Upload Benchmark with s3cmd Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Measures the time taken to upload tiles to an S3 bucket using the s3cmd tool. ```bash time s3cmd sync ~/code/gis/vogeldatenbank/tiles/ s3://tiles ``` -------------------------------- ### Open Prometheus Metrics UI Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/mock-fcgi-wms/README.md Open the Prometheus metrics UI in a web browser to view server metrics. Access it via the provided URL. ```bash open http://localhost:9090/ ``` -------------------------------- ### Execute Process Source: https://github.com/bbox-services/bbox/blob/main/bbox-processes-server/README.md Executes a specified process with provided inputs. Supports synchronous and asynchronous execution. ```APIDOC ## Execute Process ### Description Executes a specified process with provided inputs. Supports synchronous and asynchronous execution. ### Method POST ### Endpoint /processes/{process_id}/execution ### Parameters #### Path Parameters - **process_id** (string) - Required - The unique identifier of the process to execute. #### Request Body - **inputs** (object) - Required - A JSON object containing the inputs for the process. ### Request Example ```json { "inputs": { "ops": { "pos_info_query": { "inputs": { "pos_x": 2607545, "pos_y": 1171421 } } } } } ``` ### Headers - **Prefer** (string) - Optional - Use `respond-async` for asynchronous execution. ``` -------------------------------- ### Open Map Viewer with MapLibre Template Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Opens a map viewer using a MapLibre template, specifying a custom style JSON for rendering. ```bash x-www-browser http://localhost:8080/html/maplibre/mbtiles_mvt_fl?style=/assets/mbtiles_mvt_fl-style.json ``` -------------------------------- ### Initialize MapLibre Map with URL Style Source: https://github.com/bbox-services/bbox/blob/main/assets/maplibre.html Use this snippet to create a MapLibre map instance. It reads a 'style' parameter from the URL to determine the map style, falling back to a default JSON file if the parameter is not present. Ensure the MapLibre GL JS library is included and the HTML has a container element with the ID 'map'. ```javascript const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const style = urlParams.get('style') || '/assets/mbtiles_mvt-style.json'; var map = new maplibregl.Map({ container: 'map', style: location.origin + style }); ``` -------------------------------- ### Access Grafana UI Source: https://github.com/bbox-services/bbox/blob/main/bbox-server/README.md Open the Grafana web interface to configure datasources and dashboards. ```bash x-www-browser http://localhost:3000/ ``` -------------------------------- ### Set S3 Environment Variables Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Configures environment variables for connecting to a local S3-compatible storage service (e.g., MinIO). ```bash export S3_ENDPOINT_URL="http://localhost:9000" export AWS_ACCESS_KEY_ID=miniostorage export AWS_SECRET_ACCESS_KEY=miniostorage ``` -------------------------------- ### Request Alternative Style JSON Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/README.md Retrieves the style JSON for a different tileset, demonstrating flexibility in styling options. ```bash curl -s http://localhost:8080/xyz/ne_extracts.style.json | jq . ``` -------------------------------- ### Configure and Seed Tiles to S3 Storage Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/seeding.md Set environment variables for S3 connection details (endpoint URL, access key, secret access key) before seeding raster tiles to an S3 bucket. ```bash export S3_ENDPOINT_URL="http://localhost:9000" export AWS_ACCESS_KEY_ID=miniostorage export AWS_SECRET_ACCESS_KEY=miniostorage ``` ```bash bbox-tile-server seed --tileset=ne_extracts --s3-path=s3://tiles --maxzoom=5 ``` -------------------------------- ### Test BBOX Server Request (50ms) Source: https://github.com/bbox-services/bbox/blob/main/bbox-map-server/mock-fcgi-wms/README.md Send a standard GetMap request to the BBOX server, expecting a response within 50ms. This tests a typical WMS request. ```bash curl 'http://localhost:8080/wms/mock/helloworld?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=-67.593,-176.248,83.621,182.893&CRS=EPSG:4326&WIDTH=515&HEIGHT=217&LAYERS=Country,Hello&STYLES=,&FORMAT=image/png;%20mode=8bit&DPI=96&TRANSPARENT=TRUE' ``` -------------------------------- ### UMN MapServer Backend Configuration Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/map-server/configuration.md Configure the base directory for UMN MapServer project files and specify the URL path for WMS requests. ```toml [mapserver.umn_backend] project_basedir = "./maps" # Base dir for project files (.map) path = "/wms/map" # URL base path ``` -------------------------------- ### Local File Seeding Test Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Seeds tiles from a local directory to the tile server. Useful for initial testing. ```bash ../target/release/bbox-tile-server seed --tileset=gebco --tile-path=/tmp/tiles --maxzoom=2 ``` -------------------------------- ### Create Custom Tile Grid with morecantile Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/guides.md Generate a custom tile grid definition in JSON format using the `morecantile` CLI tool. Specify the EPSG code, extent, and desired name for the grid. ```bash morecantile custom --epsg 8857 --extent -17243959.06 -17243959.06 17243959.06 17243959.06 --name "EqualEarthGreenwichWGS84Quad" --title "Equal Earth Greenwich WGS84" | jq . >EqualEarthGreenwichWGS84Quad.json ``` -------------------------------- ### MBTiles Tile Store Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/configuration.md Configures an MBTiles tile store with a specified file path. ```toml [[tilestore]] name = "mbtilecache" [tilestore.mbtiles] path = "/tmp/tilecache.mbtiles" ``` -------------------------------- ### Enable Directory Collections Auto-Discovery Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/feature-server/configuration.md Configure the server to automatically discover collections from files within a specified directory. The directory path is relative to the configuration file. ```toml [[collections.directory]] dir = "../data" # Relative to configuration file ``` -------------------------------- ### Initialize OpenLayers Map with OGC Vector Tiles Source: https://github.com/bbox-services/bbox/blob/main/assets/ol-ogc-tiles.html Sets up an OpenLayers map to display OGC Vector Tiles. It configures the tile source, waits for tile grid metadata, and adds a debug tile layer. ```javascript const {Map, View} = ol; const {MVT} = ol.format; const {OGCVectorTile} = ol.source; const {VectorTile} = ol.layer; const queryString = window.location.search; const urlParams = new URLSearchParams(queryString); const layer = urlParams.get('layer'); const mvt_source = new OGCVectorTile({ url: location.origin + `/tiles/${layer}`, format: new MVT(), }); // Wait until TileGrid metadata is loaded await new Promise((resolve) => { mvt_source.on('change', function(evt){ const source = evt.target; if (source.getState() === 'ready') { resolve(); } }) }); const center = ol.extent.getCenter(mvt_source.getTileGrid().getExtent()); const mvt = new VectorTile({ source: mvt_source, background: '#d1d1d1', }); const tileDebug = new ol.layer.Tile({ source: new ol.source.TileDebug({ projection: mvt_source.getProjection(), // always WebMercator tileGrid: mvt_source.getTileGrid(), }) }); const map = new Map({ target: 'map', layers: [mvt, tileDebug], view: new View({ center: center, resolution: mvt_source.getTileGrid().getResolution(1), }), }); ``` -------------------------------- ### PMTiles Tile Store Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/configuration.md Configures a PMTiles tile store with a specified file path. ```toml [[tilestore]] name = "pmtilecache" [tilestore.pmtiles] path = "/tmp/tilecache.pmtiles" ``` -------------------------------- ### BBOX Tile Server Parallel Upload Benchmark Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Measures the time for parallel tile uploads to S3 using the bbox-tile-server. Uses default thread and task settings. ```bash # Default values (8+2 threads / 256 tasks) -> real 0m13.578s (10s-20s) ``` -------------------------------- ### Inspect MVT Tile with ogrinfo Source: https://github.com/bbox-services/bbox/blob/main/website/content/docs/tile-server/guides.md Use `ogrinfo` with the MVT driver to inspect the layers and features within a Mapbox Vector Tile (MVT) file. This helps in understanding the structure and content of the tile. ```bash ogrinfo /tmp/tilecache/ne_countries/0/0/0.pbf INFO: Open of `/tmp/tilecache/ne_countries/0/0/0.pbf' using driver `MVT' successful. 1: country (Multi Polygon) 2: country-name (Point) 3: land-border-country (Multi Line String) 4: state 5: diagnostics-tile (Polygon) 6: diagnostics-label (Point) ``` -------------------------------- ### WMS Request Benchmark to Local Directory Source: https://github.com/bbox-services/bbox/blob/main/bbox-tile-server/performance.md Measures the time to seed tiles for WMS requests to a local directory. Useful for comparing performance against S3. ```bash ../target/release/bbox-tile-server seed --tileset=ne_extracts --maxzoom=18 --tile-path=/tmp/tiles -> 13s ```