βοΈ Georama Workflow GuideΒΆ
This guide walks you through the full Georama publishing workflow β from preparing your QGIS project, configuring Georama, and integrating services, to publishing WMS and OGC API (WFS 3) layers.
πΊοΈ OverviewΒΆ
graph TB;
prepareQGIS["Prepare QGIS Project with qgis-server-light"] -. "config.json" .-> configureGeorama
configureGeorama["Configure Georama basics"] -."migrations & superuser".-> configureGeoramaUsers
configureGeoramaUsers["Configure Georama users"] -."configure users & groups".-> configureGeoramaDataIntegration
configureGeoramaDataIntegration["Configure Data integration"] -."configure projects & mandats".-> Publish
Publish --> PublishWMS
Publish --> PublishOGC
π QGIS Project StructureΒΆ
Your QGIS projects have to be structured as follows and should be referenced in the .env
file:
data/
βββ project_one
β βββ data
β βββ project_one.json (generated by the CLI script)
β βββ project_one.qgz
β βββ project_one.xml
β βββ print_templates
β βββ styles
βββ forest_fires
βββ data
βββ forest_fires.json (generated by the CLI script)
βββ forest_fires.qgz
βββ forest_fires.xml
βββ print_templates
βββ styles
π§° Prepare the QGIS ProjectsΒΆ
QGIS Server Light (QSL) offers a CLI script to extract the config JSON from QGIS Projects. It is available in the DEV version of the QSL docker image from the github container registry.
π§ CLI HelpΒΆ
You can use that as follows:
docker run --rm ghcr.io/opengisch/qgis-server-light-dev:latest qgis_server_light.exporter.cli --help
The CLI script opens the stated QGIS project and uses pyqgis to extract the elements which are necessary to build the JSON. Therefore the data which is in the defined QGIS project has to be available (local files, databases etc.). In most cases the process will run without complaints, But if the data is not available for instance the bounding boxes cant be calculated and are default values which are not the right ones.
Info
QGIS project has to be available (local files, databases etc.)
Since the data is touched the process lasts a bit depending on the amount of layers you have in your project.
Info
Remark: Having spaces in the project file name is possible but not a good idea in general.
The JSON is written to stdout. To put it in a file the stdout has to be piped into an file.
π Generate JSONΒΆ
To generate
# update the container
docker pull ghcr.io/opengisch/qgis-server-light-dev:latest
# generate the JSON for Forest Fires project
docker run --rm -v $(pwd)/data:/io/data ghcr.io/opengisch/qgis-server-light-dev:latest qgis_server_light.exporter.cli --unify_layer_names_by_group True --project /io/data/forest_fires/forest_fires.qgz > data/forest_fires/forest_fires.json
Info
The JSON can be used to configure Georama and must be available in the QGIS directory you specified in the .env
file.
π οΈ Configure Georama BasicsΒΆ
Now you can configure the Georama basics in the admin interface.
Add users and groups to configure fine grained access control later on.
π§© Configure a ProjectΒΆ
Import a QGIS project from the generated JSON file.
Configure the project details.
π Publish a OGC FeatureΒΆ
πΌοΈ Publish a WMS layerΒΆ
π Accesing the published dataΒΆ
See Endpoints to access the published data.