- 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)
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.
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).
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.
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.
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().
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