Provides additional data for 3D tiles tilesets, sourced from a GeoPackage or Postgres dataset:
- Object info, via
/objinfo?tileset=<tileset_name>&objectid=<object_id>
- 3D tiles stylesheets, via
/stylesheet?tileset=<tileset_name>&stylename=<stylename>
This service implements a backend which can be referenced as tileInfoServiceUrl
in the QWC View3D plugin configuration, tileset_name
being the name of the tileset as configured in the tiles3d
dataset entries in the themes configuration, see View3D configuration.
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
.
- JSON schema
- File location:
$CONFIG_PATH/<tenant>/tileinfoConfig.json
Example:
{
"$schema": "https://raw.githubusercontent.com/qwc-services/qwc-3d-tile-info-service/master/schemas/qwc-3d-tile-info-service.json",
"service": "mapinfo",
"config": {
"info_datasets": {
"<tileset_name>" : {
"dataset": "<dataset path or DB URL>",
"type": "<gpkg|postgres>",
"layername": "<layer name in dataset>",
"idfield": "<id field name in dataset>",
"attribute_aliases": {
"<fieldname>": "<displayname>",
...
},
"attribute_blacklist": [
"<fieldname>"
],
"styles": {
"<stylename>": {
"query": "SELECT styleSLD FROM layer_styles WHERE f_table_name = '<layer name>'",
// or
"filename": "<sld path>"
}
}
}
}
}
}
Config options in the config file can be overridden by equivalent uppercase environment variables.
Run as
python src/server.py
API documentation:
http://localhost:5016/api/
See sample docker-compose.yml of qwc-docker.
Install dependencies and run service:
uv run src/server.py
With config path:
CONFIG_PATH=/PATH/TO/CONFIGS/ uv run src/server.py