From 1f20ee40b86b2e14e0d950035edcd07b31799842 Mon Sep 17 00:00:00 2001 From: DelazJ Date: Mon, 30 Oct 2023 16:40:49 +0100 Subject: [PATCH] Update expresion functions - fixes #8582 --- docs/user_manual/expressions/expression_help/Arrays.rst | 3 ++- docs/user_manual/expressions/expression_help/Map_Layers.rst | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/user_manual/expressions/expression_help/Arrays.rst b/docs/user_manual/expressions/expression_help/Arrays.rst index 68999a866f8..faf305938ca 100644 --- a/docs/user_manual/expressions/expression_help/Arrays.rst +++ b/docs/user_manual/expressions/expression_help/Arrays.rst @@ -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 diff --git a/docs/user_manual/expressions/expression_help/Map_Layers.rst b/docs/user_manual/expressions/expression_help/Map_Layers.rst index 7e705411f69..db05d8d3385 100644 --- a/docs/user_manual/expressions/expression_help/Map_Layers.rst +++ b/docs/user_manual/expressions/expression_help/Map_Layers.rst @@ -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