Nyall Dawson 341add8cb9 Add new variable form of current feature expression functions
This adds a newer style variable form of referencing the current
feature and its attributes in expressions.

The newly introduced variables are:

- @feature: a replacement for $currentfeature, contains the
current feature
- @id: a replacement for $id, contains the current feature id
- @geometry: a replacement for $geometry, contains the current
feature geometry

This is intended as a step towards eventually deprecating the
older $ style functions, and providing a more consistent
approach to expressions instead of the older unpredictable mix of @/$.
For now these old functions still work (and likely will ALWAYS
remain working for old project compatibility), AND they are also
still exposed in the UI just to avoid user confusion (eventually
we can hide them).
2022-09-09 11:30:25 +10:00

12 lines
457 B
Plaintext

{
"name": "$geometry",
"type": "function",
"groups": ["GeometryGroup"],
"description": "Returns the geometry of the current feature. Can be used for processing with other functions. <b>WARNING: This function is deprecated. It is recommended to use the replacement @geometry variable instead.</b>",
"examples": [{
"expression": "geom_to_wkt( $geometry )",
"returns": "'POINT(6 50)'"
}],
"tags": ["current", "processing", "functions"]
}