Skip to content

qwc-services/sogis-landreg-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

198beaa · Feb 12, 2025

History

45 Commits
Dec 18, 2023
Jun 25, 2021
Feb 8, 2025
Apr 24, 2020
Jan 27, 2025
Apr 24, 2020
Feb 8, 2025
Apr 24, 2020
Jan 27, 2025
Feb 12, 2025
Feb 12, 2025
Apr 24, 2020
Feb 12, 2025

Repository files navigation

SO!GIS Land Register Extract service

Delivers a land register extract report.

Configuration

A QGIS Project containing layers and print templates to use for the land register extract (Grundbuchauszug) must be placed in the qgs-resources/ docker volume. Project name and layers must be specified using the config outlined below.

The static config files are stored as JSON files in $CONFIG_PATH with subdirectories for each tenant, e.g. $CONFIG_PATH/default/*.json. The default tenant name is default.

MapInfo Service config

  • JSON schema
  • File location: $CONFIG_PATH/<tenant>/mapinfoConfig.json

Example:

{
  "$schema": "https://raw.githubusercontent.com/qwc-services/sogis-landreg-service/master/schemas/sogis-landreg-service.json",
  "service": "landreg",
  "config": {
    "db_url": "postgresql:///?service=qwc_geodb",
    "qgis_server_url": "http://qwc-qgis-server/ows",
    "landreg_project": "landreg",
    "landreg_print_layers": "parcels",
    "landreg_printinfo_table": "qwc_geodb.print_info",
    "default_landreg_layout": "A4-Portrait"
  }
}

Environment variables

Config options in the config file can be overridden by equivalent uppercase environment variables.

Variable Description
QGIS_SERVER_URL QGIS Server URL
LANDREG_PROJECT QGIS project name
LANDREG_PRINT_LAYERS Layer names to print
LANDREG_PRINTINFO_TABLE Table containing nfgeometer and lieferdatum
DEFAULT_LANDREG_LAYOUT Default print template for land register extract

Usage

Run as

python src/server.py

API documentation:

http://localhost:5020/api/

Development

Install dependencies and run service:

uv run src/server.py

With config path:

CONFIG_PATH=/PATH/TO/CONFIGS/ uv run src/server.py

Testing

Run all tests:

python test.py