Skip to content

QUAC field reference

QUAC is the set of fields Groundwork adds to a STAC catalogue, each named with the quac: prefix. Groundwork turns every source a map connects to into a STAC catalogue, and these fields carry what STAC itself has no field for, such as a QGIS project’s form settings and the relations between its layers.

This is version 0.1.0. It is provisional and may change before version 1.0. Groundwork builds its catalogues as it loads a map and does not publish them as files yet. A field is written only when the source declares it, so a missing field means the source said nothing.

The tables below are built from the QUAC schema, schema.json, a JSON Schema (draft-07). Groundwork’s tests check the catalogues it builds against the same file.

On a Collection

FieldValueMeaning
quac:cross_origintrueRequest this layer's tiles with cross-origin access, so an exported map image can include them.
quac:dark_styletextFor a layer drawn from style documents: the style drawn in a dark theme, by its name.
quac:filtersarray of { field, name }The filters the source sets up for the Collection, in its order: a field each, and the name it is shown under. Groundwork puts each one in the layer's filter row when the map opens, ready for values to be picked. Written from the filters the Mergin Maps plugin saves in a QGIS project.
quac:form_orderarray of textThe names of the fields the source's form layout places, in its order. A column not listed is left out of the form. Written from a QGIS layer's Drag and Drop Designer form.
quac:icontextThe address of the icon drawn before this Collection's name, in the colour of the text beside it. Written from the layer variable named quac_icon.
quac:legend_imagetextThe image the source shows in place of this Collection's legend, embedded as a data URL. Written from a QGIS layer's Legend placeholder image when QGIS embeds the file in the project.
quac:light_styletextFor a layer drawn from style documents: the style drawn in a light theme, by its name.
quac:locks{ add, attributes, delete, geometry }The edits the source locks on the Collection: adding a feature, changing its attributes, changing its geometry, and deleting it. Each is true, locked for every feature, or an expression, locked for a feature while the QGIS expression comes out true for it. Written from a QGIS project's QGIS Server WFS settings and from the QFieldSync plugin's permissions.
quac:max_zoomwhole numberThe deepest tile level requested; past it, the last level's tiles are enlarged. Written from a QGIS XYZ layer's maximum zoom.
quac:measurement{ area_unit, distance_unit }The area and distance units the source gives $area, $length and $perimeter in, each as the name QGIS saves, such as ha and meters. Written from a QGIS project's Measurements settings, onto every layer's Collection. Absent means square metres and metres.
quac:overridesarray of textAdjustments applied to this Collection's style document, in order, each by a name Groundwork defines.
quac:privatetrueThe source keeps this Collection off its map and legend, such as a lookup table. Written from a QGIS layer's Private flag.
quac:related_toarray of { fields, id, name, parent_collection_id }The relations this Collection is the child side of, so its records hang off another Collection's features rather than being a map layer of their own. Written from a QGIS project's Relations.

On a table:columns entry

FieldValueMeaning
quac:attachment{ default_root, filter, relative_storage, viewer }The field holds a path to a file rather than a value of its own. Written from a QGIS Attachment widget.
quac:checkbox{ allow_null, checked, show_stored, unchecked }A Checkbox widget. Written from a QGIS Checkbox widget.
quac:colortrueThe field holds a colour, which the form shows as a swatch and changes with a colour picker. Written from a QGIS Color widget.
quac:constraints{ expression, not_null, unique }What the source checks a value against before it saves. Written from the Constraints group in QGIS's Attributes Form.
quac:controlbuttons | dropdownHow the edit form draws the field's list of choices: buttons shows each choice as a button, and dropdown a list that opens. A field that accepts typed text stays a dropdown. Written from the layer variable named quac_control_ followed by the field's name.
quac:date_formattextThe QGIS date pattern a text field stores its dates in, such as dd/MM/yyyy. Written from a QGIS Date/Time widget, only where the format is not ISO 8601.
quac:default{ expression, format, kind, on_update, value }A value the field is filled with. Written from the field's Default value and Apply default value on update in QGIS, or a UUID Generator widget.
quac:duplicate_policydefault | unsetWhat the field does when a feature is duplicated: default takes the field's default value, unset clears it. Written from the field's Duplicate setting in QGIS.
quac:editablefalseThe field is shown but no one can change it. Written from an unticked Editable box or a UUID Generator widget in QGIS's Attributes Form.
quac:editable_whentextA QGIS expression: the source's form locks the field while it comes out false, and leaves it as its Editable box says when it comes out NULL. A field-type property is the field in double quotes, and a static one is true or false. Written from a placed field's data-defined Editable property in a Drag and Drop Designer form.
quac:hiddentrueThe form never shows the field. Written from a QGIS Hidden widget.
quac:icontextThe address of the icon drawn beside the field's name, in the colour of the text beside it. Written from the layer variable named quac_icon_ followed by the field's name.
quac:in_formfalseThe source's form layout does not place the field, so its form leaves the field out. Written from a Drag and Drop Designer form that does not list it.
quac:range{ max, min, precision, step, suffix }The limits and format of a number. Written from a QGIS Range widget, or from an ArcGIS field's range domain.
quac:reuse_last_valuetrueA new feature or record is offered the value last entered in the field. Written from QGIS's Reuse last entered value.
quac:value_relation{ allow_multi, allow_null, collection, descending, filter, key, order_by, order_field, value }The field's choices are the records of another Collection in the same catalogue. Written from a QGIS Value Relation widget.
quac:visible_whenarray of textThe QGIS expressions that decide whether the form shows the field, outermost container first, each as QGIS wrote it. The field shows while all are true. Written from the enabled visibility expressions of the containers around it in a Drag and Drop Designer form.

In a Collection’s summaries

FieldValueMeaning
quac:geometry_typearray of textThe layer's geometry type as a QGIS project names it, such as Point, as a one-item array.

On a Collection’s asset

FieldValueMeaning
quac:delimited_text{ delimiter, escape, header, quote, skip_lines, trim }How the asset's file splits into rows and cells, where QGIS reads it with its Delimited Text provider rather than OGR. Written from the options a QGIS Delimited Text data source names. QGIS cannot edit a file it reads this way, so neither does Groundwork.
quac:feature_filter{ dialect, expression }The filter that keeps some of the features of the asset's data, so the Collection holds only those. Written from a QGIS file or WFS layer's Provider Feature Filter (Layer Properties > Source > Query Builder), in the language of the provider that reads the data.
quac:geometry_filterarray of Point | LineString | PolygonThe geometry types in the asset's file that the Collection holds, so a layer shows only those features. A multi-part geometry, such as a MultiPoint, counts as its single-part type. Written from QGIS file layers' geometrytype= option, which QGIS uses to split a file holding several geometry types into one layer per type; one Collection made from two such layers lists both their types, and one made from all three has no filter, so it holds the whole file.
quac:layer_nametextThe table of the asset's GeoPackage that the Collection reads, where the file holds several. Written from a QGIS layer's layername= option, for a GeoPackage only, and for each table of a GeoPackage dropped onto the map with no project.

On a Catalog

FieldValueMeaning
quac:active_collectiontextOn the top-level Catalog: the id of the Collection whose layer the map opens with as the active layer, unless the person opening it has already chosen one. Written from a QGIS project's Initial active layer, which the QFieldSync plugin sets.
quac:mutually_exclusivetrueThe group shows only one of its children at a time, as a QGIS mutually exclusive group does. Written from a QGIS project's layer tree or QGIS Server's GetProjectSettings.

Members of the object fields

quac:filters

Each entry of the array:

MemberValueMeaning
fieldtextThe field the filter filters. Always written.
nametextThe name the filter is shown under, in place of the field's own. Absent where the source gives none.

quac:locks

MemberValueMeaning
addtrue or { expression }Adding a feature. Locked for a new feature, before it has values, so an expression locks every new feature.
attributestrue or { expression }Changing a feature's attributes.
deletetrue or { expression }Deleting a feature.
geometrytrue or { expression }Moving or reshaping a feature.

quac:measurement

MemberValueMeaning
area_unittextAlways written.
distance_unittextAlways written.

Each entry of the array:

MemberValueMeaning
fieldsarray of { child, parent }The field pairs joining the two, in source order. Several pairs make one composite key. Always written.
idtextThe relation's id within this catalogue. Always written.
nametextThe relation's display name.
parent_collection_idtextThe id of the Collection holding the parent records. Always written.

quac:attachment

MemberValueMeaning
default_roottextThe folder the source says the files live in.
filtertextThe file types offered, in the source's own wording.
relative_storageabsolute | project | default-rootWhat a stored path is relative to. Always written.
viewerimage | web | audio | videoHow the file is meant to be shown.

quac:checkbox

MemberValueMeaning
allow_nulltrueA blank is a third state.
checkedtextThe value a text field stores when ticked.
show_storedtrueShow the stored value rather than true and false.
uncheckedtextThe value a text field stores when unticked.

quac:constraints

MemberValueMeaning
expression{ description, expression, strength }A QGIS expression the values must make true, the message shown when they do not, and its strength.
not_nullenforced | warnA blank value is refused (enforced) or saved with a warning (warn).
uniqueenforced | warnA value another feature holds is refused (enforced) or saved with a warning (warn).

quac:default

MemberValueMeaning
expressiontextFor expression: a QGIS expression over the record's other values.
formatwith_braces | without_braces | id128For uuid: with_braces, without_braces, or id128 (32 hex digits).
kindnow | uuid | fixed | expressionnow: the moment of the create or save. uuid: a new random identifier. fixed: value. expression: the result of expression. Always written.
on_updatetrue or falseFill the field again on every save that adds or changes the feature, not only when a new feature's form opens. Always written.
valuetext, number, true or false, nullFor fixed: the value.

quac:range

MemberValueMeaning
maxnumberThe largest value allowed.
minnumberThe smallest value allowed.
precisionwhole numberDecimal places shown.
stepnumberThe step a spin box moves by.
suffixtextText shown after the number.

quac:value_relation

MemberValueMeaning
allow_multitrueThe column stores several keys.
allow_nulltrueThe list offers a blank choice.
collectiontextThe id of the Collection holding the choices. Always written.
descendingtrueThe order is reversed.
filtertextA QGIS expression narrowing the choices.
keytextThe field of that Collection the column stores. Always written.
order_byvalue | fieldvalue orders the list by the shown value, field by order_field. Absent, it is ordered by key.
order_fieldtextWith order_by field: the field the list is ordered by.
valuetextThe field shown for it. Always written.

quac:delimited_text

MemberValueMeaning
delimitertextThe characters that each end a cell.
escapetextThe characters that each make the next character literal. A quote character here escapes only itself.
headertrue or falseWhether the first row read holds the column names.
quotetextThe characters that each open and close a quoted cell.
skip_lineswhole numberThe lines skipped before the header or the first row.
trimtrue or falseWhether space around an unquoted cell is removed.

quac:feature_filter

MemberValueMeaning
dialectogr_sql | qgis_expression | wfs_sql | ogc_filterThe filter's language: ogr_sql for GDAL's OGR SQL WHERE clause, which QGIS's OGR provider hands to GDAL; qgis_expression for a QGIS expression, which QGIS's Delimited Text provider reads and its WFS provider sends to the server; wfs_sql for the SELECT statement a QGIS WFS layer can carry instead; or ogc_filter for the OGC Filter XML it can carry in place of either. Always written.
expressiontextThe filter as the QGIS project writes it. Always written.