94 Commits

Author SHA1 Message Date
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
Juergen E. Fischer
2013984297 fix translation strings 2016-10-20 18:16:37 +02:00
Nyall Dawson
e69dd9c9b2 Fix escaping in regexp function help 2016-10-10 19:53:15 +10:00
Juergen E. Fischer
ffaffadbfa fix typos 2016-10-01 17:58:12 +02:00
rldhont
f47a7320d1 [BUGFIX] Expression in like escape % and _
The Expression LIKE binary operator does not care about escape % and _ char.
No-one has already open an issue about it but in the OGC element PropertyIsLike the user can defined is own wild and single char. This mean that QGIS has to escape % and _ if they are not used as wild and single char.
2016-09-30 14:27:53 +02:00
Patrick Valsecchi
f622c5bf2c Add expression functions for arrays and maps 2016-09-20 13:22:55 +02:00
Nyall Dawson
679797e22b [FEATURE] New simplify + smoothing expression functions
Exposes simplification and smoothing algorithms to expression
engine, via:

- simplify(): applies Douglas-Peucker geometry simplification
- simplify_vw(): applies Visvalingam-Whyatt geometry simplification
- smooth(): smoothes a geometry

Carto tip: use smooth along with geometry generators to minimise
the typical "GIS" noded look of rendered geometries!
2016-09-03 21:52:06 +10:00
Nyall Dawson
da78ddeb7c [FEATURE] New expression functions for angle/distance interpolation
angle_at_vertex: returns average (bisector) angle to a geometry
at a specified vertex index
distance_to_vertex: returns distance along geometry to a specified
vertex index
line_interpolate_angle: calculates the angle parallel to a geometry
at the specified distance along the geometry

Sponsored by Andreas Neumann
2016-08-29 11:02:17 +10:00
nirvn
2a326ef8ad [FEATURE] support aggregation of geometry
This feature adds a 'collect' aggregation method resulting in a
single multipart geometry from a list of geometries. This is exposed
in the expression engine via the existing aggregate() function,
as well as a new collect() function.
2016-08-24 08:39:05 +07:00
Nyall Dawson
e110ba7d54 [FEATURE] Add linear referencing functions to expression engine
Adds new functions
- line_interpolate_point: interpolates a point by a given distance
along a linestring geometry
- line_locate_point: returns the distance along a linestring to
the closest position on the linestring to a given point
2016-08-21 20:59:57 +10:00