mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-23 00:02:38 -05:00
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).
12 lines
457 B
Plaintext
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"]
|
|
}
|