503 Commits

Author SHA1 Message Date
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
Denis Rouzaud
6c74e4ea5d spelling fixes 2017-01-12 22:01:50 +01:00
Denis Rouzaud
748be8de71 [spelling] replace behaviour by behavior 2017-01-11 11:35:19 +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
Denis Rouzaud
37ebcdd1cd [spellcheck] allow inwords checks and line skipping
spell check will be done automatically in words by default (when some conditions are fulfilled)
possibility to avoid in words checking by adding :* at the end in spelling.dat

one can add #spellok at the end of a line of code to skip spell check on this line
2017-01-10 20:18:37 +01:00
Harrissou Sant-anna
ef85cdcf83 Replace "eg" by "e.g." or "for example" 2016-12-30 00:03:22 +01:00
Nyall Dawson
dd9a03a972 Merge pull request #3915 from DelazJ/fixtypos
Fix typos
2016-12-29 11:47:23 +10:00
nirvn
25697a1e41 improve default favorites for color ramps 2016-12-29 08:24:54 +07: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
Thomas Gratier
1a5671ecae Update unworking and outdated URLs
GDAL URLs and Spatialite links are outdated (404)
2016-12-22 23:11:58 +01:00
Denis Rouzaud
9c4be41441 [spelling] labelling -> labeling 2016-12-19 23:58:29 +01:00
Nyall Dawson
034cc65935 [FEATURE] Remove c++ heatmap plugin
No longer required as plugin has been ported to analysis lib
with processing frontend

Marked as feature for docs + changelog notices
2016-12-07 12:23:58 +10:00
nirvn
e2265290b0 [style manager] refresh symbols shipped by default & add tags 2016-11-22 14:46:36 +07:00
nirvn
efd299220e package symbology-ng-style.xml instead of the .db file 2016-11-22 14:36:47 +07: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
nirvn
5e487cfea4 [FEATURE] Style management re-work and upgrade
- A new favorite grouping system was added, which the symbols list
widget defaults to
- The selected tag / smartgroup in the symbols list widget now
persists when switching layers (and across sessions)
- The symbols list widget will update the tag / smartgroup combo
box when users add / rename / remove categories
- Users can now directly tag, as well as add to favorites, symbols
while saving those to the style database
- To streamline style management, groups have been removed and
fully replaced by tags
- Tags have been integrated into the import/export user interface
2016-11-16 14:12:19 +07: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
60cc853747 Add perceptually uniform colormaps to default styles
Adds the Viridis, Magma, Plasma and Inferno uniform color ramps
created by Stéfan van der Walt and Nathaniel Smith

See https://bids.github.io/colormap/ for more details

Note that I've thinned out the stops here, and only kept
every 5th stop from the original ramps
2016-10-11 16:46:43 +10:00
Nyall Dawson
e69dd9c9b2 Fix escaping in regexp function help 2016-10-10 19:53:15 +10:00
Juergen E. Fischer
22af5bf5d4 fix typos 2016-10-09 01:47:09 +02:00
Juergen E. Fischer
d9349e5bbb update configuration settings to qgis3 2016-10-06 11:40:42 +02: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
Nyall Dawson
298d047125 [FEATURE] Expression functions for offset_curve and single_sided_buffer
Especially useful with geometry generators!
2016-08-17 06:43:02 +10:00
Harrissou Sant-anna
e3867832bb Remove duplicate example (#3360) 2016-08-10 14:45:34 +02:00
Denis Rouzaud
f2c3fb003e renamed QgsSymbolLevelsV2Dialog to QgsSymbolLevelsDialog 2016-08-05 08:22:43 +02:00
Denis Rouzaud
275736de92 removed V2 from QgsSymbolV2* 2016-08-05 08:22:21 +02:00
Nyall Dawson
10c92394e7 [FEATURE] API + expression function for merging linestrings
Adds a new method to QgsGeometry for merging linestrings.
By passing a multilinestring, any connected lines will
be joined into single linestrings. Behind the scenes this
uses GEOS' line merge.

A corresponding expression function "line_merge" has also
been added.
2016-07-28 20:33:27 +10:00