489 Commits

Author SHA1 Message Date
Nyall Dawson
8ce33e1e08 [feature][expressions] Add new apply_dash_pattern function.
Applies a dash pattern to a geometry, returning a MultiLineStringi
geometry which is the input geometry stroked along each line/ring
with the specified pattern.

Rules can be set to control how the dash pattern is adjusted
at line endings. If a start rule or end rule is set, the adjustment
option defines whether both dash and gaps, or only dash or gap
sizes are adjusted to apply the rules.

An optional pattern offset can specify how far along the pattern
the result should start at.
(The offset is applied AFTER any start/end rules are applied.)

Sponsored by North Road, thanks to SLYR
2021-10-30 18:18:03 +11:00
Nyall Dawson
deba02b162 [feature][expressions] Add new "scale" function for scaling a geometry
Just like the 'rotate' function, 'scale' accepts an optional point
to apply the scaling from. If not specified, scaling is done
from the centre of the geometry's bounding box.
2021-10-23 05:18:09 +10:00
Nyall Dawson
9496367e61 [feature][expressions] Add expressions for creating triangular/square/curved waves
along a geometry

The new expression functions are:
- triangular_wave: Constructs triangular waves along the boundary of a geometry.
- square_wave: Constructs square/rectangular waves along the boundary of a geometry
- wave: Constructs rounded (sine-like) waves along the boundary of a geometry
- triangular_wave_randomized: Constructs randomized triangular waves along the boundary of a geometry
- square_wave_randomized: Constructs randomized square/rectangular waves along the boundary of a geometry.
- wave_randomized: Constructs randomized curved (sine-like) waves along the boundary of a geometry
2021-10-23 05:17:07 +10:00
Nyall Dawson
02003274bb Fix parameter names for affine expression function
Convention in qgis is underscore_name for expression function
names/parameter names
2021-10-14 13:30:41 +10:00
Nyall Dawson
54f77cee5a Expose control over buffer join, cap, miter limit to expression "buffer" function 2021-10-13 17:28:04 +10:00
Loïc Bartoletti
1666afe7fd
Merge pull request #42648 from roya0045/fix_mainangle
[Bugfix] geometry engine::main_angle : promote longer box in case of tie
2021-10-11 08:47:41 +02:00
Vincent Cloarec
45e07dd72f
Select mesh elements by expression UI (#44835)
[mesh] [feature] Select mesh elements by expression
2021-09-09 08:29:45 +02:00
Antoine Facchini
9e38e43876
Add affine transform expression (#44771) 2021-09-02 10:57:50 +10:00
Vincent Cloarec
c2e607cbd7
add function $z for expression (#44776)
[feature] [expression] add function $z for expression
2021-09-01 09:08:36 +02:00
Vincent Cloarec
bc192a60b2
Mesh expressions: add $vertex_as_point and $vertex_z functions (#44786)
* mesh expression $vertex_as_point $vertex_Z_value

* functions help

* SIP, doc and indentation

* fix SIP

* fix help file

* change function name and add Meshes group description

* fix typo

* fix strings and docs

* typo
2021-08-24 20:56:16 +02:00
Antoine Facchini
7cdad5bfd9 Update resources/function_help/json/straight_distance_2d
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
2021-08-23 15:00:41 +10:00
Antoine Facchini
d55b97a5d5 add straight distance expression help 2021-08-23 15:00:41 +10:00
Harrissou Sant-anna
3bc3a116c4 Extrude function input geometry is of line type
not polygon
2021-08-22 08:20:31 +10:00
Martin Pergler
d9fd2a98be Simplify per review
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2021-07-30 11:49:07 +10:00
Martin Pergler
1d845c8a6c Improve sinuosity help
Added explanation what this new expression actually calculates, based on help coded in /src/core/geometry/qgscurve.h
Also streamlined noted requirement that needs to be applied to a curve.
2021-07-30 11:49:07 +10:00
Loïc Bartoletti
3e430232f2 Update resources/function_help/json/sinuosity
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
2021-07-29 07:26:08 +10:00
Loïc Bartoletti
638e9a2ac0 add sinuosity help 2021-07-29 07:26:08 +10:00
Salvatore Fiandaca
2c9a97dff1
Merge pull request #44380 from pigreco/toto
correction examples expr: make_rectangle_3points
2021-07-27 08:18:06 +10:00
Mathieu Pellerin
754328cbd0
[feature][expression] Add exif() and exif_geotag() functions to the QGIS expression engine (#44081) 2021-07-08 17:36:12 +07:00
Harrissou Sant-anna
23048dd813 Missing colon 2021-06-29 06:45:36 +10:00
Harrissou Sant-anna
fc3f8a124d Missing colon 2021-06-29 06:45:36 +10:00
Harrissou Sant-anna
a87b2ecf62 Fix function examples 2021-06-29 06:45:36 +10:00
Harrissou Sant-anna
1fea062b9c Add precision on default locale of format_number function
and display places parameter default value
2021-05-17 10:41:04 +10:00
Harrissou Sant-anna
783f502a19 Tweak the notes on NULL use 2021-05-17 09:47:08 +10:00
Harrissou Sant-anna
468b059eff Add groups property to NULL value 2021-05-17 09:47:08 +10:00
Harrissou Sant-anna
a75402bddd Add a "groups" property to expression operators 2021-05-17 09:47:08 +10:00
Harrissou Sant-anna
15d4e877b1 Default the ascending parameter of order_parts function to true 2021-05-10 09:19:05 +10:00
Martin Pergler
2fed93cdfd
Better help for format function
Added description of what syntax/parsing engine is used for the formatting. Motivated by https://github.com/qgis/QGIS/issues/42806, but in general a good idea so users can look up more in detail what is possible. Also uniformized spelling (placeholder vs placeholder).
2021-05-05 09:04:36 +10:00
Stefanos Natsis
9a42f23491
Order map keys by length before using in replace function
Fix #42940
2021-04-27 14:05:23 +10:00
Alex
869fdc866d doc improvement 2021-04-19 12:24:18 -04:00
Hannes
5e0d409b3e Update help for date handling expression functions, remove "variable" 2021-03-31 09:00:13 +10:00
Hannes
000f8ee410 Improve docs about locales for date handling expression functions 2021-03-31 09:00:13 +10:00
nirvn
6c6fd067b0 [ui] Move layer_property() function from General to Map Layers group for ease of discoverability 2021-03-12 12:31:19 +10:00
Harrissou Sant-anna
ffbedde2cf Delete json_to_map function 2021-03-11 07:38:00 +10:00
Harrissou Sant-anna
4037a76c4c Delete map_to_json function 2021-03-11 07:38:00 +10:00
Nyall Dawson
fbf46350d1
Merge pull request #42096 from DelazJ/mapsFunctions
improvements fixes to Maps functions
2021-03-09 08:44:44 +10:00
Harrissou Sant-anna
c91043aee8 Remove trailing comma 2021-03-09 06:15:41 +10:00
Harrissou Sant-anna
4e89d1aef6 format_date function does not only take and output date
datetime or time can be used to output something else
2021-03-09 06:15:41 +10:00
Harrissou Sant-anna
ed6a85894c
Fix json_to_map example output 2021-03-08 12:56:22 +01:00
Harrissou Sant-anna
a216ffc5fa
Fix from_json output 2021-03-08 12:49:44 +01:00
Harrissou Sant-anna
210a69e2c9
map_insert overrides existing key 2021-03-08 12:43:17 +01:00
Harrissou Sant-anna
a9e05dca15
Fix typo and more details to map_get function 2021-03-08 12:33:14 +01:00
Harrissou Sant-anna
c3e31b0495
Add missing quote 2021-03-08 12:24:54 +01:00
Harrissou Sant-anna
0aecc06c56
Fix map_to_hstore example, output a string 2021-03-08 12:22:55 +01:00
Harrissou Sant-anna
34357c1b0b
Update hstore_to_map example output 2021-03-08 12:20:18 +01:00
Harrissou Sant-anna
eaacde8eff Fix array_replace group name 2021-02-25 11:28:03 +10:00
Damiano
0707d6f54c
array_count, array_prioritize, array_replace added to expressions (#41338) 2021-02-24 15:14:10 +10:00
Andrea Giudiceandrea
d7167e48d0 [feature][expressions] Add "length3D" function to return the 3D length
of a LineGeometry type geometry using QgsLineString::length3D(). If the geometry is not a 3D line string, it returns its 2D length.
2021-02-24 12:59:28 +10:00
Matthias Kuhn
14e5c6094d
Merge pull request #41364 from domi4484/modeMajorityConfusion
Fix array mode/majority confusion
2021-02-20 10:09:52 +01:00
Alessandro Pasotti
9489afe02a Feature: mime_type expression function
Adds a mime_type( bytes ) expression function

Funded by: Today I didn't go skiing.
2021-02-20 05:03:09 +10:00