515 Commits

Author SHA1 Message Date
Andrea Giudiceandrea
d90c2e3ba4 [expressions] bearing: make source_auth_id and ellipsoid optional 2023-09-08 09:07:46 +10:00
Andrea Giudiceandrea
b98c758539 [expressions][feature] Add bearing function 2023-09-08 09:07:46 +10:00
Alexander Bruy
aa9f115241 make floor division operator visible in the expression builder and add
help for it (fix #52094)
2023-06-08 08:40:24 +10:00
Alexander Bruy
d0c7c6e930 fix formula for exponential interpolation
The scale_exp function renamed to scale_polynomial and has an alias
scale_exp to preserve backward compatibility.

A new function using correct formula was added as scale_exponential.
2023-05-31 09:02:01 +10:00
Harrissou Sant-anna
c9af18975f Replace $-based functions with their corresponding @ variable in expression examples
Also cleans a little bit tags list
2023-05-12 06:30:43 +10:00
Nyall Dawson
f7a7a24edb Make map id optional in map_credits layout function
If not specified, the credits for ALL layers from ALL maps
will be collected
2023-04-13 17:44:37 +10:00
Nyall Dawson
fe158c2faa Fix some invalid help example expressions 2023-04-12 09:51:36 +10:00
Nyall Dawson
850fb3ae46 Remove unused outdated help files 2023-04-12 09:51:36 +10:00
Harrissou Sant-anna
91bc780404 Another unnecessary parenthesis 2023-04-11 07:25:37 +10:00
Harrissou Sant-anna
7269abe1ab Add precision to concatenator parameter 2023-04-11 07:25:37 +10:00
Harrissou Sant-anna
a2b2459995 Remove excessive parenthesis 2023-04-11 07:25:37 +10:00
Harrissou Sant-anna
7235ee7d83 better wording
Co-authored-by: Mathieu Pellerin <nirvn.asia@gmail.com>
2023-04-05 06:53:36 +10:00
DelazJ
d9edb37154 Add a group for sensors expressions 2023-04-05 06:53:36 +10:00
DelazJ
e3a86b1acd Delete unused 'Conditions' group 2023-04-05 06:53:36 +10:00
Harrissou Sant-anna
5f8c4ae5f5 Add example of flip_coordinates with linestring 2023-04-04 05:12:34 +10:00
Mathieu Pellerin
d2b117a3c8 [sensors] Brand new sensors framework (manager, registry, sensor types) 2023-03-24 15:28:47 +07:00
Harrissou Sant-anna
d979743ef0 Add more details to the modulo operator 2023-03-07 09:45:01 +10:00
Nyall Dawson
3c91c624c8 [expressions][feature] Add ltrim/rtrim functions
Allows trimming spaces or other characters from just the
start or end of strings
2023-03-06 08:38:38 +10:00
Nyall Dawson
49adde6b9a [expressions] Re-permit format_number to omit group separators
After 6fcef30cc50, group separators were always included in the
results from format_number (even if a locale which doesn't use
them like the 'C' locale is specified). 6fcef30cc50 was added
to fix an old regression, but in doing so we lost flexibility
to skip unwanted separators.

Workaround this by introducing a new opt-in omit_group_separators
argument for format_number to skip the thousand separators when
desired. Also add an opt-in trim_trailing_zeroes argument for
further flexibility.
2023-02-07 15:15:04 +10:00
Nyall Dawson
fae25a6857 Update resources/function_help/json/feature_id 2023-01-13 13:26:56 +10:00
Nyall Dawson
390cb760c9 [feature][expressions] Add feature_id(some feature) function
Allows for retrieving the feature ID of a feature object. Accepts
one argument which must be a feature object. Accordingly this
function can be used with the results of any other function
which returns feature objects, such as "get_feature", "overlay_*",
etc.

Fixes #51116
2023-01-13 13:26:56 +10:00
Mathieu Pellerin
660990e0d8 Follow up 7e2e622 : improve functions help 2023-01-11 06:51:38 +10:00
Nyall Dawson
b23eb1d250 [feature] New function "load_layer"
This function (available only in Processing expressions for now),
allows loading a map layer via a source string and provider name.

It is designed to allow use of the expression functions which
directly reference map layers (such as the aggregate functions)
with a hardcoded layer path, eg. then permitting these functions
to be used outside of a project (such as via the qgis_process tool)
2023-01-09 14:35:50 +10:00
Harrissou Sant-anna
d8eac90dff missing comma 2023-01-03 13:53:19 +10:00
Harrissou Sant-anna
df50648717 Correctly expose optional argument in represent_value function 2023-01-03 13:53:19 +10:00
Mathieu Pellerin
7e2e6220e8
[expressions] New is_feature_valid()/is_attribute_valid() functions (#51303) 2022-12-30 20:00:23 +07:00
Antoine Facchini
46ed1e12bd refacto: replace the parameter name 'i' to 'vertex' 2022-11-29 17:47:53 +01:00
Antoine Facchini
77e9491329 docs: inform users that some expression functions are deprecated 2022-11-29 17:47:52 +01:00
Antoine Facchini
d8131a0791 feature: add x_at, y_at, z_at and m_at expressions 2022-11-29 17:47:52 +01:00
Alessandro Pasotti
66e5a4e319 Remove spaces 2022-11-10 13:04:40 +01:00
Alessandro Pasotti
71c513a281 Raster maptips and html map functions 2022-11-09 09:48:03 +01:00
Alessandro Pasotti
f040c260bd Raster maptips 2022-11-09 09:48:02 +01:00
Alessandro Pasotti
b37f5f4b03 Raster attributes and raster maptips 2022-11-09 09:48:02 +01:00
Salvatore Fiandaca
502a539a24 print error example concave hull
function correction in the example in the help from `concavehull` to `concave_hull`
2022-10-03 07:14:50 +10:00
Harrissou Sant-anna
8de9cd4548 Fix array_get argument name
Fixes https://github.com/qgis/QGIS-Documentation/issues/7814
2022-09-30 09:30:07 +10:00
Harrissou Sant-anna
264221442c Format between and not between functions syntax to match other operators' 2022-09-26 11:25:35 +10:00
Nyall Dawson
bf9325d679 Generalize a warning 2022-09-19 09:17:30 +02:00
Harrissou Sant-anna
c3b1fd43b9 make_valid - Add an example of unclosed polygon and reedit empty geometry example 2022-09-16 06:59:18 +10:00
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
Harrissou Sant-anna
55319c4485 Add linework based example 2022-09-09 07:13:57 +10:00
Harrissou Sant-anna
5507547d95 Fix make_valid examples 2022-09-09 07:13:57 +10:00
Nyall Dawson
dcdb4cd054 [feature][expressions] Add new shared_paths function
Returns a collection containing paths shared by the two
input geometries. Those going in the same direction are
in the first element of the collection, those going in
the opposite direction are in the second element. The
paths themselves are given in the direction of the first
geometry.

(Exposes the GEOS shared paths functionality for use
in expressions.)
2022-09-05 13:02:40 +10:00
Nyall Dawson
b9413ed7b9 [expressions] Add 'method' and 'keep_collapsed' parameters to make_valid function 2022-09-05 12:35:53 +10:00
Harrissou Sant-anna
af22f2cf01 Fix and add examples of geometries_to_array function 2022-09-04 07:02:10 +10:00
Alex
09c8a19627
[expressions] Add make_valid and geometries_to_array functions 2022-09-03 09:35:54 +10:00
Loïc Bartoletti
ada9fc6d45
Merge pull request #50052 from DelazJ/makerectangles3points
Remove excess parentheses
2022-09-01 13:39:09 +02:00
Harrissou Sant-anna
744203324f
Remove excess parentheses 2022-09-01 11:07:37 +02:00
Loïc Bartoletti
80e7ba354a
Add Concave hull API and expression function
Exposes the GEOS concave hull operation to QgsGeometry API and a via a new concave_hull expression function.

Requires GEOS 3.11+
2022-09-01 02:58:35 +00:00
Hannes
d8d850c2ed Improvements to line_interpolate_point() docs
- Make it more obvious that the distance is in CRS units, not a percentage, on the first example
- Add example that ends up with floating point coordinates
- Add example that returns NULL
2022-08-22 09:09:09 +10:00
Harrissou Sant-anna
42181ab68b
Add examples to NOT BETWEEN function
showcasing equality with bounds value as well as case-sensitivity
2022-06-27 13:15:00 +02:00