517 Commits

Author SHA1 Message Date
roya0045
70ab8651a0 missing functs and improvements 2022-01-12 10:26:38 -05:00
Alex
fed4c74928
Apply suggestions from code review
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
2022-01-11 11:25:21 -05:00
Alex
d7ffe0b7ec
DelazJ bonification
Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
2022-01-11 11:17:49 -05:00
roya0045
57e25ca19e proposal tags
made with https://gist.github.com/roya0045/eaa19acabe1033569f97b40604b7e6df
2022-01-07 08:33:29 -05:00
Nyall Dawson
47715fec63 [feature][expression] Add geometry_type function
Returns the high-level type of a geometry (Point/Line/Polygon)
2022-01-06 17:22:22 +10:00
Alessandro Pasotti
df64116867
Merge pull request #46684 from roya0045/improve_func_doc
extend geometry_n definition
2022-01-05 09:45:36 +01:00
Alessandro Pasotti
89d54caaa4
Merge pull request #46502 from elpaso/formatted_attributes
New represent_attributes function
2022-01-04 09:31:54 +01:00
Alex
35d9e12eb7 extend geometry_n def 2022-01-03 11:39:45 -05:00
Martin Pergler
551026c592 Fix default value for buffer cap argument
Default is 'round' (tested), old value 8 was a miscopy from line above.
2021-12-26 07:26:28 +10:00
Alessandro Pasotti
40947d4266 Invert args 2021-12-17 15:18:59 +01:00
Alessandro Pasotti
e2266aafe0 Remove obsolete file 2021-12-15 23:49:23 +01:00
Alessandro Pasotti
ae8fc0d4f6 Tests for represent_attributes 2021-12-14 18:02:18 +01:00
Etienne Trimaille
60d1c917ef Add example with hamming_distance with different length 2021-12-14 11:22:37 +10:00
Alessandro Pasotti
f0a337cff0 Renamed to represent_attributes 2021-12-13 16:35:36 +01:00
roya0045
df07610064 get_features multi arg 2021-12-08 08:55:26 -05:00
Alessandro Pasotti
a90e34a765 Address PR comments 2021-12-08 06:44:44 +10:00
Alessandro Pasotti
dfee28974a Move url_encode to Maps group 2021-12-08 06:44:44 +10:00
Alessandro Pasotti
5aa7037ecb Better wording? 2021-11-29 14:11:11 +10:00
Alessandro Pasotti
4e4bade6ea Handle GEOS >= 9.3 and mention it in the docs 2021-11-29 14:11:11 +10:00
Alessandro Pasotti
3283aa4228 Handle linestrings 2021-11-29 14:11:11 +10:00
Alessandro Pasotti
9d65691949 Disable tests for GEOS < 9.3 2021-11-29 14:11:11 +10:00
Alessandro Pasotti
a7d42051c0 Typo 2021-11-29 14:11:11 +10:00
Alessandro Pasotti
31f24479c5 Add link to postgis ST_MaximumInscribedCircle 2021-11-29 14:11:11 +10:00
Alessandro Pasotti
d881f226ab Function help 2021-11-29 14:11:11 +10:00
Alessandro Pasotti
df805e07c0 Multipart checks 2021-11-29 14:11:11 +10:00
Harrissou Sant-anna
74a5e449e0
Double espace backslash in help and add examples 2021-11-26 15:31:27 +01:00
Harrissou Sant-anna
ebcb7e33a7
Double escape backslash in help and examples 2021-11-26 15:31:23 +01:00
Alessandro Pasotti
c9c5896a77 formatted_attributes() expression function
Funded by: Kanton Solothurn
2021-11-25 15:36:34 +01:00
Andrea Giudiceandrea
ed4130c2c4 Remove "azimuth" function from "Math" group 2021-11-18 09:09:20 +11:00
Andrea Giudiceandrea
169b25aa93 Remove "inclination" function from "Math" group 2021-11-18 09:09:20 +11:00
Alessandro Pasotti
f8c2123b53 Better description 2021-11-17 15:54:33 +01:00
Alessandro Pasotti
fba1762c7d map_prefix_keys function
Funded by: Kanton Solothurn
2021-11-17 13:36:44 +01:00
Nyall Dawson
3d8fc9d521 [feature][expressions] Add new densify_by_count and densify_by_distance
expression functions

These functions expose the existing Processing densify functionality
for use in expression functions

Fixes #24853
2021-11-05 14:12:52 +11:00
Harrissou Sant-anna
02b68ae361 Introduce index example in array and map functions 2021-11-05 10:13:48 +11:00
Harrissou Sant-anna
245e1baaf4 Trying to focus on the geometry function and expose it simply with more practical examples 2021-11-05 07:23:19 +11:00
Harrissou Sant-anna
55f7402ab0 Show more expression functions examples
also fix typo
2021-11-05 07:23:19 +11:00
Antoine Facchini
97b288dcee
Add roundness method to curve polygon (#45154)
* add roundness function

* add roundness function tests

* add roundness function help

* add roundness expression

* add roundness expression tests

* add roundness expression help

* add roundness processing

* add roundness processing tests

* add roundness processing help

* fix import and typo

* Fix typo

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Add tag

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Fix typo

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Modify the description

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>

* Replace equality condition by qgsDoubleNear

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* Change types for literals

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* add since version

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* add a const

* add the \since adding in the sip file

* Fix typo

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* Fix typo

Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>

* Remove SIP factory annotation

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Remove double calculation of permimeter

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Always add an attribute

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Use QGSCOMPARENEAR in tests

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Shorten the short description

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Make a more complete help string

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* Correct the description

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>

* reformat bad code styles

* sipify

Co-authored-by: Harrissou Sant-anna <delazj@gmail.com>
Co-authored-by: Loïc Bartoletti <lbartoletti@users.noreply.github.com>
Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
2021-11-04 08:44:03 +01:00
Nyall Dawson
11dc9cca18 Add force_polygon_cw and force_polygon_ccw expression functions
These are recommended for use instead of the existing force_rhr
function, due to the variability in definition of the "right hand
rule" between different software applications. Using an explicit
force_polygon_cw/ccw function removes user confusion when the
results vary between different applications.
2021-11-01 12:10:41 +11:00
Nyall Dawson
c36a042828 [feature][expression] Add a "per_part" option to "rotate" expression
function

If set to true and no explicit rotation center point is specified (ie
rotation happens around the geometry's center), then the rotation
is applied around the center of each part individually instead of the
geometry as a whole.

This is designed mostly to aid cases when rotate is used as a cartographic
tool as part of a geometry generator symbol layer.

Sponsored by North Road, thanks to SLYR
2021-10-31 18:19:01 +11:00
Nyall Dawson
c94c74127c Document that function accepts polygons, add test 2021-10-30 18:18:03 +11:00
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