103 Commits

Author SHA1 Message Date
Matthias Kuhn
a97d846471
Single parameter version of represent_value
Becuase `represent_value("fieldname")` is much shorter to write and in 98%
there is no need to specify the name separately as
`represent_value("fieldname", 'fieldname')`.
2017-09-29 10:58:18 +02:00
Matthias Kuhn
b527be02d7 Fix function help for represent_value 2017-09-26 14:28:44 +02:00
Matthias Kuhn
beddd25074 [FEATURE] Expression function represent_value
This will lookup the representation value given the widget
configuration. This is helpful to get nicely formatted messages for
value maps, value relations and others in expressions.
2017-09-26 14:28:44 +02:00
lbartoletti
6ae929e9cb initial commit 2017-09-08 08:06:21 +02:00
DiGro
b3448ed4a8 Typo corrected
appoximation   --> should be:  approximation
2017-09-05 15:28:40 +02:00
Nyall Dawson
0a9e9944b4 [FEATURE] Expression function for hausdorff distance
Allows calculation of the Hausdorff distance between two
geometries
2017-08-31 08:02:44 +10:00
arnaud.morvan@camptocamp.com
e34a593c65 [FEATURE] Add expression function array_agg 2017-08-12 10:18:21 +02:00
Andreas Neumann
267286ee61 Correct an error in array_slice function description
There was a copy/paste error in the "name"
2017-08-09 16:34:20 +02:00
Nyall Dawson
4ab4a1fcad Spell check 'mitre' -> 'miter' (i.e. use en-us variation) 2017-08-07 18:08:57 +10:00
andreasneumann
42d7e0b898 renamed parameter names of array_slice, ran prepare-commit.sh 2017-08-06 19:11:32 +02:00
andreasneumann
89784691b1 [FEATURE] array_slice expression function 2017-08-06 19:11:32 +02:00
Andreas Neumann
303f9b7cdd [FEATURE] expression function array_reverse 2017-08-05 22:45:11 +02:00
Andreas Neumann
c3ae3bfc74 Added new help files to the expression function groups of Arrays and Maps 2017-08-04 20:30:37 +02:00
Andreas Neumann
c2138ca4bd Correct help of expression array_remove_all 2017-08-04 16:25:23 +02:00
lbartoletti
d88a7f4198 add missing help for inclination 2017-08-01 21:48:03 +02:00
Nyall Dawson
878ee5c067 Add items for project map layers and relations to expression builder
Allows easy insertion of map layer IDs and relation IDs into
expressions. Numerous expression functions now utilise these,
so it makes sense to allow them to be easily inserted.

Fix #11680, #16879

Sponsored by Andreas Neumann
2017-07-31 08:08:18 +10:00
Matthias Kuhn
875a5d6d9d Merge pull request #4818 from DelazJ/spelling
Fix some spelling issues
2017-07-08 10:20:40 +02:00
Matthias Kuhn
066528de4f get_feature_by_id docs 2017-07-07 13:01:17 +02:00
Matthias Kuhn
f379be2033 array docs 2017-07-07 13:01:17 +02:00
Matthias Kuhn
10dc0d5da9 Rename set_variable to with_variable 2017-07-07 13:00:47 +02:00
Harrissou Sant-anna
15be88918f Replace "double click" and "doubleclick" by double-click 2017-07-07 01:26:38 +02:00
Nyall Dawson
39d20a4cb4 Move algorithm expression context generation to QgsProcessingAlgorithm
Fix error when selecting "from expression" in algorithm parameter dialog
2017-06-06 11:25:09 +10:00
nirvn
3419945a8d [FEATURE] create_ramp() expression function 2017-05-29 16:31:53 +07:00
lbartoletti
13c1318a5f New geometry class: QgsRegularPolygon (#4502) 2017-05-10 22:23:28 +10:00
lbartoletti
84471f2e6d New classes for circle and ellipse. 2017-04-27 10:25:29 +10:00
Nyall Dawson
b55e4b9abd Add qgsi->qgis to spell check 2017-04-03 08:55:07 +10:00
Juergen E. Fischer
5a962e8d4e translation string fixes 2017-03-05 11:37:57 +01:00
Matthias Kuhn
26557c9a88 [FEATURE] Add new expression function env 2017-03-01 07:52:37 +01:00
Mathieu Pellerin
07cbfdd2e3 [FEATURE] epoch() expression function (#4151)
This commit adds an epoch() function to the expression engine which
returns the interval in milliseconds between the unix epoch and a
given date value.
2017-02-22 17:31:44 +07:00
Mathieu Pellerin
ecf1f5a576 [FEATURE] expression engine's is_layer_visible() (#4045) 2017-01-25 11:47:26 +07:00
Nyall Dawson
1f3c67f8e3 Add missing ~ operator to expression builder 2017-01-19 16:03:48 +10:00
Denis Rouzaud
0a63d1f2c2 [spellcheck] properly look into various cases and add more fixes" 2017-01-16 16:39:20 +01:00
Nyall Dawson
f2032ea268 [FEATURE] item_variables expression function inside compositions
This adds a new item_variables expression function when expressions
are used inside a composition context.

The function takes a single argument, the id for an item inside
the composition, and returns a map of variable name to value
for that item.

This allows you to do things like insert text in a label fetching
properties of another item in the composition, eg

Insert scale of map into a label:

map_get( item_variables( 'map'),'map_scale')

Insert x coordinate of map center into a label:

x(map_get( item_variables( 'map'),'map_extent_center'))
2017-01-11 12:26:32 +10:00
Harrissou Sant-anna
ef85cdcf83 Replace "eg" by "e.g." or "for example" 2016-12-30 00:03:22 +01:00
DelazJ
828e447991 More spelling fixes
* editation
* definintion
* Unabled
* capitalize QGIS
* replace algs by algorithms
* queryings
* symbo(s)
* missing space after a dot
2016-12-29 01:53:55 +01:00
Nyall Dawson
20dc7fb266 [FEATURE] raster_statistic expression function for retrieving
raster band stats from a loaded layer

Allows raster band stats (eg min, max, avg) to be used in
expressions
2016-11-22 12:07:25 +10:00
Nyall Dawson
1f81a7c4fc [FEATURE] pole_of_inaccessibility expression function
Exposes calculation of pole of inaccessiblity to expression
engine
2016-11-14 15:52:41 +10:00
nirvn
6b2b4c578a [FEATURE][expression] strpos() and regexp_match() improvements
- strpos() now relies on a simple string within a string search
- regexp_match() now returns pos of a matching regular expression
2016-11-10 11:55:20 +07:00
Matthias Kuhn
5093ec6bc9 Improve num_selected and is_selected function help 2016-11-09 08:45:53 +01:00
nirvn
0fbcc4b95d [FEATURE] upgrade the substr() function
- support negative start value (e.g. substr('hello',-2) returns 'lo')
- support negative length value (e.g. substr('hello',3,-1) returns 'll')
- length parameter now optional, defaults to end of string
  (e.g. substr('hello world',7) returns 'world')
2016-11-08 08:42:17 +10:00
nirvn
1d245b2ef6 [FEATURE] add regexp_matches() function
The new function returns an array of strings captured by capturing
groups in a supplied regular expression. For e.g., the following
expression: regexp_matches('qgis=>rocks','(.*)=>(.*)')
will return the following array: 'qgis', 'rocks'.
2016-11-07 10:47:19 +07:00
Nyall Dawson
2b545822e7 [FEATURE] New expression function 'extend'
Extends linestrings by a specified amount at the start and
end of the line
2016-10-31 07:56:24 +10:00
nirvn
17fc7dbe53 [FEATURE] add array_distinct() function 2016-10-28 10:51:14 +07:00
Matthias Kuhn
adb184e435 Add documentation for @parent aggregate filter 2016-10-27 23:11:51 +02:00
Nyall Dawson
fb4578131f Merge pull request #3678 from nirvn/string_to_array_to_string
[FEATURE] add string_to_array() and array_to_string() functions
2016-10-28 04:44:25 +10:00
Matthias Kuhn
01f3c9ae38 [FEATURE] Add is_selected and num_selected functions
* is_selected() returns if the current feature is selected
* num_selected() returns the number of selected features on the current layer
* is_selected(layer, feature) returns if the "feature" is selected. "feature"
  must be on "layer".
* num_selected(layer) returns the number of selected features on "layer"
2016-10-27 17:24:15 +02:00
nirvn
7373036edf [FEATURE] add string_to_array() and array_to_string() functions 2016-10-27 22:12:59 +07:00
nirvn
3fb2d9e4e3 [expression] further improve replace() to support a map argument 2016-10-27 11:33:28 +07:00
nirvn
8b74201470 [FEATURE] array support for the replace() expression function 2016-10-26 17:01:56 +07:00
Nyall Dawson
6f82740670 [expressions] Allow non-greedy regex by switching to QRegularExpression 2016-10-26 16:04:38 +10:00