108 Commits

Author SHA1 Message Date
nirvn
a5d670233b [FEATURE] add darker() and lighter() expression functions 2015-12-09 15:50:59 +11:00
Matthias Kuhn
4b3083d9a7 [FEATURE] Add translate expression function
Funded by
 * Regional Council of Picardy
 * ADUGA
 * Ville de Nyon
 * Wetu GIT cc
2015-12-08 08:49:05 +01:00
Matthias Kuhn
f961ecef46 [FEATURE] Add an eval expression
Funded by
 * Regional Council of Picardy
 * ADUGA
 * Ville de Nyon
 * Wetu GIT cc
2015-12-08 08:43:45 +01:00
Nyall Dawson
da436f926b [FEATURE] New 'reverse' expression for reversing linestrings 2015-11-26 16:53:55 +11:00
Juergen E. Fischer
90053c52d6 also update strpos function help (followup 2a557db) 2015-11-20 19:53:30 +01:00
Nyall Dawson
de1540357b [expressions] Add make_line and make_polygon functions 2015-11-06 20:09:48 +11:00
Nyall Dawson
12e34f2672 [expressions] Allow make_point to accept z/m values, add new
make_point_m for creation of PointM geometries. Also add
m(point) and z(point) functions for retrieving z/m value of
a point or node.
2015-11-06 20:09:13 +11:00
Nyall Dawson
da942233e7 Add DE-9IM variant which tests against a specified pattern
(available in PyQGIS/expression engine)
2015-11-04 16:03:55 +11:00
Nyall Dawson
9d4e995de6 [FEATURE] Add geometry relation DE-9IM expression function 2015-10-26 22:46:53 +11:00
Juergen E. Fischer
3c324c9985 fix lpad/rpad context help (followup b46cbbe) 2015-09-27 01:52:20 +02:00
Juergen E. Fischer
b46cbbe425 fix mixup between lpad/rpad help (fixes #13433) 2015-09-26 21:32:27 +02:00
Nyall Dawson
a4d980d055 Port from expressions+ plugin: color_part, set_color_part, day_of_week 2015-09-21 19:57:58 +10:00
Juergen E. Fischer
82b34afe03 move remaining function_help to json and update it's translation handling 2015-09-20 18:35:27 +02:00
Matthias Kuhn
41a330f271 More expression help 2015-09-20 14:18:25 +02:00
Matthias Kuhn
2a6cff403b More examples for the expression function help 2015-09-20 13:59:54 +02:00
Matthias Kuhn
b2c404d17c Improve expression help 2015-09-20 13:51:10 +02:00
Nyall Dawson
55027e545f Clean up and extend expression geometry functions:
- New expression functions for area(geom), perimeter(geom),
point_n(geom), start_point(geom), end_point(geom), make_point(x,y)
- Add new variant to length() function which takes a geometry object,
allows for length(geom) evaluation.
- Rename x_at, y_at to $x_at, $y_at (alias old names) to reflect that
these only work on current feature geometry
- Add x(geom), y(geom) functions which return x and y coordinate
for point geometries or centroid x/y for non-point geometries
(fix #11008)
2015-09-18 09:09:09 +10:00
Sandro Santilli
55dbc041a8 [FEATURE] Add num_points(geometry) support in expression evaluator
Includes tests and help text.
2015-09-17 14:23:19 +02:00
Matthias Kuhn
25af142456 Add expression function help for $length 2015-09-17 11:08:29 +02:00
Juergen E. Fischer
e2816256f6 translation fix 2015-09-13 20:24:42 +02:00
Nyall Dawson
709c14391b Change expression help from free form html files to structured json
A new script then parses these json help files into the html help
contents, in a standardised manner. Previously, the function help
was a bunch of different formats and structures.

Now, a custom stylesheet can be applied (and later tweaked!) to
format these help. Eg, this commit colors variables and function
names in the syntax section for greater readability.
2015-09-02 14:22:50 +10:00
Nyall Dawson
7871d6c5fc Remove a bunch of layer variables, replace with new layer_property
function

layer_property takes a layer name/id and a property (eg 'crs')
and returns the matching value. This approach is more flexible than
having all these values as variables, since it allows retrieval
of properties of a layer from contexts which aren't layer-aware
(eg a composer label showing the metadata of a layer).
2015-08-24 12:00:11 +10:00
Nyall Dawson
334ea504db Add help for project_color function 2015-08-22 19:01:42 +10:00
Nyall Dawson
2a951ec945 Add some missing expression group help 2015-08-22 19:01:42 +10:00
Nyall Dawson
6487f1716c Add help text for variables 2015-08-22 19:01:42 +10:00
Matthias Kuhn
de2b6a9688 Add function help for IF expression
Fix #13015
2015-07-13 08:45:23 +02:00
Nyall Dawson
7b18f67662 Include NULL in expression builder available functions list 2015-07-08 16:14:15 +10:00
Nyall Dawson
feb3bee858 Add a bunch of optimised fuzzy string matching algorithms.
A new QgsStringUtils class has been added containing some
common fuzzy matching algorithms, including Levenshtein edit
distance and Soundex. These can be used for finding "similar"
strings in a table.

Expression functions for these algorithms have also been
added to a new "Fuzzy Matching" group.
2015-06-27 11:51:56 +10:00
Tomáš Pospíšek
0af69ed9fb Add pertinent example for 'LIKE' operator
The usage examples for the 'LIKE' operator are not really pertinent. The proposed change adds an example that actually illustrates the usual usage of the 'LIKE' operator.
2015-06-03 12:51:04 +02:00
Nyall Dawson
bae9cea4f9 Add missing files from 96db1bd 2015-05-03 21:09:47 +10:00
Nyall Dawson
96db1bdb7e Allow expression functions to include 0 length parameter lists
This change allows for some cleanups to the built in expression
functions, by making it possible to differentiate variables
(eg $feature) from functions which don't require parameters
(eg uuid(), now()... ). Also adds aliases for uuid(), now(), and
pi().
2015-05-03 20:57:37 +10:00
Nyall Dawson
bd9e02be95 Add alias support for expression functions
Standardise naming of all internal functions to lowercase with
underscore convention. Add aliases for old names to avoid
breakage.
2015-05-03 20:57:36 +10:00
Juergen E. Fischer
bdcbeb19ad fix format_date example (fixes #12016) 2015-01-20 21:17:18 +01:00
Juergen E. Fischer
8d20272748 function help fixes 2015-01-09 19:49:01 +01:00
Juergen E. Fischer
b52fff303f avoid duplicate function help entry 2015-01-09 19:33:22 +01:00
rldhont
a0ffad2532 [FEATURE] Add get and transform geometry in Expression
In version 2.6, new keywords has been added to Expression :
* $currentfeature - returns the current feature
* $atlasfeature - returns the atlas feature
* getFeature - gets a matching feature from a layer

But I think, Expression lacks a few keywords :
* geometry - returns the feature's geometry
* transform -  returns the transformed geometry

These new keywords can be used with getFeature for some geometry tests like
 intersects, crosses, contains, etc

Tests has been added to geometry and transform in Expression
2015-01-02 12:02:55 +01:00
Nathan Woodrow
f8a838d5c5 Fix #11308 - Add missing IN operator 2014-10-04 22:05:07 +10:00
Marco Hugentobler
dab5ff95ff Add function help for getFeature 2014-09-02 16:21:45 +02:00
Nyall Dawson
9abeeb64e6 [FEATURE] New $atlasfeature expression function for returning the current atlas feature. Also clean up the expression groups and move some unrelated functions out of the 'Record' group. 2014-07-10 15:52:48 +10:00
Nyall Dawson
1e39db6a0f [FEATURE] New expression functions for $currentfeature (returns current feature) and 'attribute' (returns value stored in specified field within a feature) 2014-07-10 14:10:44 +10:00
Juergen E. Fischer
df19f65445 expressions: add help for $uuid (fixes #10094) 2014-06-22 04:23:39 +02:00
Juergen E. Fischer
8cd467bea2 generate context_help and function_help in the same order 2014-06-20 14:22:42 +02:00
cdavila
a70c865b62 Remove duplicated line 2014-06-17 09:01:16 +02:00
cdavila
8c7b6717c9 Fix wrong reference to geometries in sintax
Geometry a was repeated and geometry was missing
2014-06-17 08:44:56 +02:00
Nathan Woodrow
3499a390d6 Fix #8756 - Update function help for colour functions 2014-05-18 23:28:55 +10:00
Nyall Dawson
2ce741678f Add expression functions for bounding box (bounds), bounding box width & height (bounds_width/bounds_height), and min/max x/y coordinates (xmin/xmax/ymin/ymax) 2014-05-18 21:53:00 +10:00
Werner Macho
9864bfc11b adding function help for atlasid and atlasgeometry
Signed-off-by: Werner Macho <werner.macho@gmail.com>
2014-04-10 12:01:18 +02:00
Juergen E. Fischer
efabcdfc99 german translation update and translation string fixes 2014-03-11 11:46:46 +01:00
Mathieu Pellerin (nirvn)
5105f5f93e [expression] fix function help following argument ordering shift 2014-02-21 18:43:20 +07:00
Mathieu Pellerin (nirvn)
1c5228cca8 [expression] made wordwrap delimiter string an optional 3rd argument 2014-02-21 18:43:12 +07:00