542 Commits

Author SHA1 Message Date
Julien Cabieces
6c2c9b7750 feat(Expression): Add project_color_object function
Which contrary to project_color doesn't return a string
representation there is no rgb conversion involved
2024-10-01 14:03:55 +10:00
Julien Cabieces
c6c755b51a feat(Expression): Add ramp_color_object function
Which contrary to ramp_color doesn't return a string
representation there is no rgb conversion involved
2024-10-01 14:03:55 +10:00
Mathieu Pellerin
e1709a3655 Address review 2024-09-08 10:56:58 +07:00
Mathieu Pellerin
5cd1e31b82 [expression] Add line_interpolate_point_by_m and line_locate_m expressions 2024-09-08 10:52:04 +07:00
Julien Cabieces
87142708d1 feat(Expression): Make darker/lighter works with color object
and not just string representation
2024-09-03 09:46:26 +02:00
Julien Cabieces
f4b463db05 feat(Expression): Make (set_)color_part functions works with object
not just string representation
2024-09-03 09:46:26 +02:00
Julien Cabieces
dd41e147f8 feat(Expression): Add color_mix function
It takes string representation or color object as arguments so the
function can work with CMYK color without changing its color type and converting it to RGB.
2024-09-03 09:46:26 +02:00
Julien Cabieces
0b034b7e87 feat(Expression): Make color_grayscale_average works with object
So the function can work with CMYK color without changing its color
type and converting it to RGB.
2024-09-03 09:46:26 +02:00
Julien Cabieces
3fd6c3bdfe feat(Expression): Add color_hsvf
Contrary to color_hsv, color_hsvf allows to load a color from float
component (and not int) into a QColor object (and not a string representation).
2024-09-03 07:39:05 +10:00
Julien Cabieces
15bae7e6ab feat(Expression): Add color_hslf
Contrary to color_hsl, color_hslf allows to load a color from float
component (and not int) into a QColor object (and not a string representation).
2024-09-03 07:39:05 +10:00
Julien Cabieces
53db863fe2 feat(Expression): Add color_cmykf
Contrary to color_cmyk, color_cmykf allows to load a color from float
component (and not int) into a QColor object (and not a string representation).
2024-09-03 07:39:05 +10:00
Julien Cabieces
3203704931 feat(Expression): Add color_rgbf
Contrary to color_rgb, color_rgbf allows to load a color from float
component (and not int) into a QColor object (and not a string representation).
2024-09-03 07:39:05 +10:00
Tudor Bărăscu
b4b84813d3 Be clear that the expressions return invalid when they cannot convert
I got mislead by the "Nothing is returned if a value cannot be converted" as it led
me to believe I was expecting NULL.
2024-05-30 07:29:04 +10:00
uclaros
10559048c0 QGIS does rock, but we need comprehensive examples 2024-05-10 06:18:16 +10:00
uclaros
03f967848c add missing tr to header generated by map_to_html_table expression function 2024-05-10 06:18:16 +10:00
Germap
eac5f8e521 [Expressions] Add missing tag (crs ellipsoid) to layer_property function 2024-01-28 09:42:26 +01:00
uclaros
f0ec3a0aea finalize mesh label rendering 2024-01-08 05:20:26 -08:00
Alexander Bruy
9ded559386 initial support for mesh labeling 2024-01-08 05:20:26 -08:00
Harrissou Sant-anna
65535f4c2a Allow use of minimum/maximum as alias for min/max aggregate argument in aggregate function 2023-11-27 06:15:57 +10:00
Germap
b96e48b808 [Expressions] Clean up tags in age function
Previous tags were generated by a script, which produced an ugly tag value ('yearmonthweekdayhourminutesecond').
2023-11-23 13:41:49 +10:00
Germap
7e7a8a1f57 [Expressions] Add tags to layer_property function
Fix #39828
2023-11-23 13:41:49 +10:00
Hannes
6efe66d488 Add simple-as-possible example to geometries_to_array expression function 2023-11-14 08:28:14 +10:00
Nyall Dawson
fb98e1a1e8 Update resources/function_help/json/array_foreach
Co-authored-by: Björn <pathmapper@posteo.de>
2023-10-29 11:48:21 +10:00
pathmapper
56c8419d42 Add note that counter starts at 0
ref https://github.com/qgis/QGIS/pull/54962#issuecomment-1766732808
2023-10-29 11:48:21 +10:00
pathmapper
d65c0caa47 array_foreach expression - add counter variable 2023-10-29 11:48:21 +10:00
Andrea Giudiceandrea
cf3814ef97 [feature][expressions] layer_property: add crs_ellipsoid property 2023-09-12 14:40:24 +10:00
Andrea Giudiceandrea
49f2ec9007 Apply suggestions from code review
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2023-09-08 09:07:46 +10:00
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