54 Commits

Author SHA1 Message Date
Jean Felder
6565b0d3f9 processing: Fix some tests for GEOS 3.11 and above
This has been tested with GEOS 3.10, 3.11 and 3.12.
2023-08-10 04:56:29 +10:00
Nyall Dawson
9d1fc68c1d Get remaining processing tests working on newer systems 2022-08-10 16:33:18 +10:00
Nyall Dawson
4af0e4c1a0 Get some more processing tests working on newer GDAL/GEOS 2022-08-08 17:50:06 +10:00
Nyall Dawson
5a6b76abaf Fix difference algorithm when differencing a point results in
a null geometry

Fixes #49291
2022-07-12 11:42:10 +10:00
Andrea Giudiceandrea
2c807f918b Add tests for native:setzfromraster with offset 2022-06-18 05:44:28 +10:00
Nyall Dawson
07ee0bb7e4 Fix some tests on newer GEOS 2022-03-17 18:12:27 +10:00
webmaster
b420a23acd [processing] Fix erroneous call to secsTo when it should be msecsTo
(fixes #47727)
2022-03-11 10:27:11 +01:00
Germán Carrillo
ec23963359 Add tests for join attributes table with name conflicts (fix for #47650) 2022-03-09 11:07:01 +10:00
Clemens Raffler
baf50af3cd add more testcases with differing layer CRSs 2021-10-25 09:30:34 +10:00
Clemens Raffler
9eabef7623 add ellipsoid and crs settings in test 2021-10-25 09:30:34 +10:00
Clemens Raffler
9ef92b7d1f add testcase for centroid based distance 2021-10-25 09:30:34 +10:00
Clemens Raffler
257f45297c add python based test 2021-10-25 09:30:34 +10:00
Mathieu Pellerin
4d2c24e850 [processing] Adjust st-dbscan algorithm to new duration parameter, change default unit to hours 2021-09-06 16:57:36 +10:00
Nyall Dawson
cf40573d2c [feature][processing] Add new "Select within distance" and
"Extract within distance" algorithms

These algorithms allow users to select or extract features from one
layer which are within a certain distance of features from another
reference layer.

The distance checking is heavily optimised, using spatial indices
to restrict the number of features retrieved, and also automatically
handing the check off to the database server for postgis layers.

The distance parameter can also be data-defined.

Sponsored by QTIBIA Engineering
2021-08-06 17:37:09 +10:00
nirvn
f68ef8fb60 [feature][processing] A brand new spatiotemporal ST-DBSCAN clustering algorithm 2021-07-26 10:30:14 +10:00
Alexander Bruy
82ad2051e6 fix file permissions
remove duplicated short help file
2021-06-21 07:17:36 +03:00
Nyall Dawson
7e5b6dde2f Loosen test precision following Geographiclib area calculation switch 2021-02-27 13:15:22 +10:00
Nyall Dawson
25886c30de A bit of repairs to vector tiles algorithm test 2021-02-08 13:23:39 +10:00
Nyall Dawson
465fe14ea8 More tolerance in some tests 2021-02-08 13:23:39 +10:00
Nyall Dawson
c9ca4febfe Add secondary reference layer for tapered buffer alg 2021-02-08 13:23:39 +10:00
Nyall Dawson
b106c209a3 Fix some more processing alg tests 2021-02-08 13:23:39 +10:00
Nyall Dawson
b6ee3e66a3 [feature][processing] Add new algorithm to retain only selected fields
Allows users to select a list of fields to keep, and all other fields
will be dropped from the layer. Helps with making flexible models where
input datasets may have a range of different fields and you need to drop
all but a certain subset of these
2020-11-23 19:20:40 +10:00
Nyall Dawson
b07a58c028 [processing] Port delete fields algorithm to c++
1:1 port for speed/compile time safety, no user-facing changes

Also add tests
2020-11-23 19:20:40 +10:00
Alexander Bruy
bdce38bc0b drop useless test 2020-11-02 09:47:29 +02:00
Alexander Bruy
9414e3f54a test for DXF export algorithm 2020-11-02 09:47:29 +02:00
Even Rouault
53c5c337ec [Algorithms] JoinByNearest: accept max_distance == 0.0 (fixes #38761) 2020-09-16 06:15:11 +10:00
Mathieu Pellerin
af81515831
[processing] Add a cluster size attribute to the kmean cluster algorithm 2020-08-27 13:08:42 +07:00
nirvn
d827faa2c8 [processing] Upgrade the sample raster value algorithm to native C++ 2020-08-17 12:59:34 +07:00
Nyall Dawson
95bd7b296b [feature][processing] New algorithm "Align points to features"
This algorithm calculates the rotation required to align point features
with their nearest feature from another reference layer. A new field is
added to the output layer which is filled with the angle (in degrees,
clockwise) to the nearest reference feature.

Optionally, the output layer's symbology can be set to automatically
use the calculated rotation field to rotate marker symbols.

If desired, a maximum distance to use when aligning points can be set,
to avoid aligning isolated points to distant features.

Designed for use cases like aligning building point symbols to follow
the nearest road direction!
2020-07-26 09:56:46 +10:00
Alexander Bruy
bc8b55e1f7 add tests 2020-07-08 12:43:51 +03:00
Alessandro Pasotti
672d6ec5b2 Fix test: cast to float 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
4304d8636d Fix precision in test 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
50f66ba3cb Increase tolerance when comparing floats in processing tests 2020-06-20 04:30:18 +10:00
Even Rouault
93bc7c2f04 Raster rendering: enable provider-side resampling when available, and reprojection is done 2020-06-20 04:29:36 +10:00
Martin Dobias
502429a0c0 Add processing test for the vector tile writer alg 2020-05-08 12:55:08 +02:00
Nyall Dawson
dee6f3f30d Add flag to allow a child algorithm's results to prune back the remaining model branches
When an algorithm returns this flag, and after executing it in a model it doesn't set a
certain output which remaining model algorithms depend on, then these branches are
pruned back and don't get executed for the model run.

Allows for creation of algorithms which impact the overall model flow.
2020-03-18 02:52:37 +10:00
Nyall Dawson
a7f33be401 [FEATURE][processing] Add new algorithm "Filter by geometry type"
This algorithm filters features by their geometry type. Incoming
features will be directed to different outputs based on whether
they have a point, line or polygon geometry.

Allows for model creation which responds to different input
layer geometry types by applying different logic depending on the
input geometry type.
2020-03-18 02:52:37 +10:00
gacarrillor
8d2f75da0f Test for Remove Duplicate Vertices alg. (Polygons with duplicates in several holes) 2020-03-09 22:22:37 -05:00
gacarrillor
e41930d1b7 Avoid a boolean variable in GeometryCollection.removeDuplicateNodes(); fix tests 2020-02-28 21:38:42 -05:00
gacarrillor
403fe33bfa Test for Remove Duplicate Vertices alg. (geometry collection) 2020-02-26 23:55:13 -05:00
Nyall Dawson
a9ed83f1a6 [FEATURE][processing] New algorithm "Rename table field"
Takes an input layer, existing field and a new name for the field, and
outputs a new layer with the selected field renamed.

While this result could also be achieved with the Refactor Fields
algorithm, Refactor Fields isn't particularly model friendly. It
relies on a constant, fixed table structure, and can't adapt to
input tables with different field structures.

In constrast, this simple Rename Field algorithm adapts nicely for
model use, because it operates on a single field only and leaves
all the other fields untouched.
2020-01-15 21:56:10 +13:00
Nyall Dawson
5792966b12 Update test results 2020-01-02 14:20:14 +10:00
Nyall Dawson
12006de1aa [processing] Port Delete Duplicate Geometries to c++ 2019-12-31 15:06:42 +10:00
Nyall Dawson
2433ee555f [FEATURE][processing] Add native affine transform algorithm for vectors
Offers the following benefits over the GRASS/SAGA versions:
- Full support for z/m values and handling curved geometries without loss
of curves
- Works with all native data types, no need for format transformation
- Supports dynamic (data defined, per feature) translate/scale/rotate parameters
- Allows transformation and scaling of both Z and M values (if present)
- Supports in-place edit mode

Fixes #33550
2019-12-31 15:01:34 +10:00
Nyall Dawson
c409025409 [FEATURE][processing] New algorithm "Split features by character"
This algorithm splits features into multiple output features by
splitting a field's value with a specified character.

For instance, if a layer contains features with multiple comma
separated values contained in a single field, this algorithm can
be used to split these values up across multiple output features.

Geometries and other attributes remain unchanged in the output.

Optionally, the separator string can be a regular expression for
added flexibility.

Designed for use in models which need to process input files
with multiple concatenated values in a single attribute, e.g.
geocoding a table with "address1,address2,address3" format strings
2019-09-06 11:09:37 +10:00
Nyall Dawson
8ef960442d [processing] Use lists, not maps in overlap analysis algorithm
Ensures consistent field ordering and that fields are always matched
to input layer order
2019-07-26 10:21:20 +10:00
Martin Varga
4013925083 [processing] deferred transparency/bg_color option in xyz alg 2019-06-07 11:09:41 +02:00
Martin Varga
3a9b32d635 [processing] added new options (alpha, quality, tile_size) to xyz alg 2019-06-07 11:09:41 +02:00
Mathieu Pellerin
a888986567
[needs-docs][processing] Avoid field collision via optional prefix in overlay algorithms (#10092)
Makes for a more predictable collision avoidance, which
can be neccessary for some models.
2019-05-24 19:00:28 +07:00
Nyall Dawson
289e72dc07 Adjust precision of some processing tests to allow them to pass under proj 6 2019-05-21 19:14:55 +10:00