Writes a QGIS project's map as a STAC catalogue, with its map layer settings added through QUAC, a profile of STAC: from QGIS Desktop into a folder on each save or on demand, and from QGIS Server on request.
One plugin with two parts. QGIS Desktop writes the project's catalogue into a folder each time the project is saved. QGIS Server answers a request such as SERVICE=QUAC&REQUEST=GetCatalogue&MAP=<project> with the project's map as one STAC catalogue in JSON.
STAC (SpatioTemporal Asset Catalog) says what data exists, where it is and how to read it. QUAC (Quite Useful Additions for Catalogs) adds the map layer settings a STAC catalogue has no field for, so a web or mobile app can show and edit each layer as the project sets it up, without reading the project file.
What the catalogue holds:
- Map: groups, and groups that show one layer at a time
- Layers: title, abstract, licence, extent and time range; geometry type; which layers start switched on; read-only layers and locked edits (adding, changing, moving, deleting); whether features can be identified; the field that names each feature; scale range and opacity
- Fields: names, aliases and types; the choices a Value Map offers, each as the value stored and the label shown for it; and the layer a Value Relation takes its choices from, with the fields stored and shown
Other form and field settings, such as ranges, constraints and default values, are not included in this version.
In QGIS Desktop:
- Turn it on under Project Properties, QUAC, and choose a folder: the project's own folder, or one inside it so that the project file is not shared.
- Each save writes <project>.stac.json into that folder and the other documents into a <project>.stac folder beside it, with each layer's style as a QML file.
- Each layer's data is linked by a path relative to the document, so the folder can be opened from disk, from a synced cloud folder or from a copy on web storage. A layer whose data file is outside the folder, that is held in a database, that QGIS could not open, or whose web address holds a user name or password is left out, and the message bar says which. A WMS, WMTS or XYZ layer is written with its address even when QGIS could not reach its server.
- STAC software opening a cloud folder's share link cannot follow these relative paths; software that reads the synced folder from disk, a copy on web storage, or the cloud folder through its provider's own API can.
- Every .tif or .tiff file is labelled a Cloud Optimized GeoTIFF; software that trusts the label can be slow or fail on a plain GeoTIFF read over the web.
- Project, Write STAC catalogue now writes it from the project as last saved, whether or not the option is on. The Processing algorithm Write QUAC catalogue writes it for a project file, in batch mode over many, or from the command line with qgis_process.
- The catalogue is as current as the last save with the option on, or the last time it was written on demand.
In QGIS Server:
- Each layer is linked to the WMS and WFS services QGIS Server publishes for it, with its WMS styles and the coordinate systems WMS offers it in.
- It applies the project's QGIS Server settings, as GetProjectSettings does, so layers and fields the server does not publish stay out.
- With an access-control plugin installed, each person gets only the layers and fields they may read, and the edits they may not make are locked.
- Without one, it keeps one shared copy per project until the project changes.
Runs on QGIS and QGIS Server 3.40 or later, QGIS 4 included, with Python's standard library only. The QUAC spec, its JSON Schema and a JavaScript package that writes and reads catalogues are at https://github.com/vectoriahq/quac.
Plugin Tags