Write QGIS expressions with AI
Build an expression for a label, filter or calculated field. Test it against a real feature and distinguish a parsing error from a problem in the data.
Write QGIS expressions with AI when you can describe the map you want but are unsure how to combine a field, a number and a piece of text. The qgis-syntax-expressions skill helps you prepare the expression in the context where it will run. A park label, for example, might need a fallback when the name field is empty.
A missing quotation mark is a parsing problem. An expression that parses but fails on particular records calls for a different check. In PyQGIS, you may also need to supply the layer’s fields and the current feature before evaluating the expression.
What it does
- Compose a label from more than one attribute.
- Choose a fallback value for a missing name.
- Build a filter for features meeting a particular condition.
- Use project or layer variables where the context supplies them.
- Check parsing and evaluation errors separately in Python.
Install and use
- Install the skill and use QGIS 3.44 or later. Use its PyQGIS environment for the programmatic examples.
- Ask, “Build a label from these two park fields and show what happens when the name is missing.”
- Preview it on an ordinary record and a missing-value case before applying it more widely.
FAQ
Source
Made by OpenAEC Foundation (Impertio-Studio). Original skill: qgis-syntax-expressions, published on GitHub under the MIT licence.
View on GitHub