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.
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'))
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
- 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
- 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')
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'.
* 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"
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
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.
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!
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
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.
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
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.