Skip to content

Commit

Permalink
Update expresion functions - fixes #8582
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ committed Oct 30, 2023
1 parent ad87666 commit 1f20ee4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/user_manual/expressions/expression_help/Arrays.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,11 @@ Returns an array with the given expression evaluated on each item.
- array_foreach(array, expression)
* - Arguments
- * **array** - an array
* **expression** - an expression to evaluate on each item. The variable `@element` will be replaced by the current value.
* **expression** - an expression to evaluate on each item. The variable `@element` will be replaced by the current value and the variable `@counter` by the current index (starting with 0).
* - Examples
- * ``array_foreach(array('a','b','c'),upper(@element))`` → [ 'A', 'B', 'C' ]
* ``array_foreach(array(1,2,3),@element + 10)`` → [ 11, 12, 13 ]
* ``array_foreach(array(1,2,3),@element + @counter)`` → [ 1, 3, 5 ]


.. end_array_foreach_section
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Returns a matching layer property or metadata value.
* crs: layer CRS
* crs_definition: layer CRS full definition
* crs_description: layer CRS description
* crs_ellipsoid: ellipsoid of the layer CRS
* crs_ellipsoid: acronym of the layer CRS ellipsoid
* extent: layer extent (as a geometry object)
* distance_units: layer distance units
* type: layer type, e.g., Vector or Raster
Expand Down

0 comments on commit 1f20ee4

Please sign in to comment.