996 Commits

Author SHA1 Message Date
Nyall Dawson
3d2f37a756 Fix test which was never working, but just skipped on CI because too old GDAL 2024-12-14 10:22:12 +10:00
Nyall Dawson
05c269d61d Fix test on newer GEOS versions 2024-12-14 10:22:12 +10:00
Jan Caha
f593da593a
New Algorithm - Mesh Surface to Polygon (#58941)
* new algorithm

* update feedback

* allow cancel during mesh face processing

* allow cancel during mesh faces processing

* fix file names

* fix the speed of the algorithm

* drop not needed imports

* fix issues

* more readable

* add mesh layer

* test case

* simplify to avoid warning

* fix issue

* fix data call

* fix call

* fix expected data

* handle meshes with holes

* add test case

* merge from master

* Update src/analysis/processing/qgsalgorithmmeshsurfacetopolygon.cpp

fix translation

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* Update src/analysis/processing/qgsalgorithmmeshsurfacetopolygon.cpp

fix translation

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* Update src/analysis/processing/qgsalgorithmmeshsurfacetopolygon.cpp

fix translation

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix translation

* typo

* clone

* delete to avoid memory leak

---------

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-11 16:04:48 +02:00
Nyall Dawson
1a4bd44937 Rename field to extremum_type 2024-11-11 13:01:42 +10:00
Nyall Dawson
2890df089d [feature] Add raster zonal min/max algorithm
This algorithm extracts point features corresponding to the minimum
and maximum pixel values contained within polygon zones.

The output will contain one point feature for the minimum and one
for the maximum raster value for every individual zonal feature
from a polygon layer.
2024-11-11 13:01:42 +10:00
Nyall Dawson
a7bd4f3bf2 [processing] Add algorithm to extract min/max pixel from raster
This algorithm extracts extrema (minimum and maximum) values
from a given band of the raster layer.

The output is a vector layer containing point features for
the selected extrema, at the center of the associated pixel.

If multiple pixels in the raster share the minimum or maximum
value, then only one of these pixels will be included in the output.

The algorithm uses raster iterator to remain efficient on huge
rasters, and does not require reading the entire raster to
memory
2024-11-07 10:13:55 +11:00
Andrea Giudiceandrea
5f85a82caa [processing][feature] Add tests for gdal:ogrinfo and gdal:ogrinfojson 2024-07-11 08:58:22 +10:00
Alexander Bruy
5e53e183a5 address review comments 2024-07-05 05:18:25 +10:00
Alexander Bruy
7bd8c071f3 port Basic statistics for fields algorithm to C++
Also add new optional output a table containing calculated statistics
similar to the Statistics by categories algorithm (fix #46241)
2024-07-05 05:18:25 +10:00
Nyall Dawson
7ec94dc2c3 Only run gdal_grid, gdal_rasterize tests on GDAL 3.7+
The inputs we use for these run tests have open options, and now
that we are respecting these and passing them to the GDAL command
we can't run these tests on the earlier GDAL versions which
didn't support open options.

The commands generated by the corresponding algorithms are already
well tested and still run on the earlier GDAL releases, it's just
the actual run test which will be skipped.
2024-06-27 13:07:25 +10:00
Nyall Dawson
c0ad63cf36 Regenerate some GDAL output reference files
We now pass on the FORCE_SRS_DETECTION=YES open option which we
were previously dropping, so the results for these commands is
slightly different

Also drop test for older GEOS versions, it's covered by a test
for more recent versions and we have extensive test covering
the GDAL command line for this tool anyway.
2024-06-27 13:07:25 +10:00
Nyall Dawson
5ea8a0df25 Fix tests on newer GEOS 2024-06-17 13:23:27 +10:00
Loïc Bartoletti
015e06575c [Processing] creategrid: Allow negative overlay
The creategrid algorithm had a limit of 0 to 1000000000.0.
I'm removing this limitation to go beyond this maximum limit, but above all to
allow a negative limit, which in fact allows an empty space
(the opposite of superposition).
2024-06-07 23:27:55 +02:00
Nyall Dawson
7355c24db8 [processing] Endpoint distance threshold for network analysis
Adds an optional end point distance threshold parameter to the
network analysis tools. Previously (and still, by default) endpoints
will ALWAYS be snapped to the nearest point in the network layer,
regardless of how far away from the network they actually are. This
can result in meaningless results, as the tools will happily snap
points to a road hundreds of kilometers away :)

Now, there's an optional end point distance threshold parameter
for these tools. The behaviour of the threshold depends on the
algorithm:

- For the “Service area (from layer)” tool an optional new output
was added for “non routable features”. This output will contain
any features which were deemed too far from the network. All
other features which are within tolerance distance to the
network will be stored in the standard output from the tool.
- For the “Service area (from point)” tool an error will be raised
if the point is too far from the network
- For the “Shortest path (point to point)” tool an error will
be raised if either the source or destination points are too far
from the network.
- For the “Shortest path (layer to point)” and “Shortest path (point
to layer)” tools:
  - An error will be raised if the **point** is too far from the network.
  - A new optional output was added for “non routable features”. This
    output will contain any features which were deemed too far from the
    network. All other features which are within tolerance distance to
    the network will be stored in the standard output from the tool.

Sponsored by City of Canning
2024-04-20 08:50:00 +10:00
Nyall Dawson
84f37095bc
Fix typo 2024-03-20 14:17:00 +10:00
Nyall Dawson
d2e3534dbd [processing] Use correct ellipsoid for network analysis tools
Use the processing context's ellipsoid instead of a hardcoded
WGS84 ellipsoid for distance calculations during network
analysis, so that the lengths used will exactly match other
measurement tools used on the same features in the same
project.
2024-03-19 13:44:02 +10:00
Nyall Dawson
cdada7c764 Add test variants for GEOS >= 3.11 2024-02-12 18:38:21 +10:00
Nyall Dawson
da7461ff77 Fix some processing tests on newer library versions 2024-02-12 18:38:21 +10:00
Alexander Bruy
35d8864fec add tests 2024-01-29 17:14:11 +01:00
Mathieu Pellerin
c3738acb6f [processing] Regenerate primary key when running the dissolve algorithm (fixes #55587) 2024-01-25 06:06:56 +10:00
Sebastian Gutwein
017bed7e51 fix test 2023-12-26 17:33:06 -05:00
Alexander Bruy
8efd68e117 add test 2023-12-01 08:35:08 +10:00
Nyall Dawson
2456290168 Add tests 2023-11-02 22:03:20 +10:00
Alexander Bruy
a0fc443b5b add test files 2023-10-09 12:14:20 +02:00
Alexander Bruy
e3023455ca use run() to execute nested algorithms
move step calculation to prepareAlgorithm to avoid crash
disable tests for native implementation
2023-10-09 12:14:20 +02:00
Alexander Bruy
a4e473392c concave hull tests based on geos version 2023-10-09 12:14:20 +02:00
Alexander Bruy
17426302ff address review 2023-10-09 12:14:20 +02:00
Alexander Bruy
d18190ce4f make cppcheck happy 2023-10-09 12:14:20 +02:00
Alexander Bruy
514e8b5b24 use geos to calculate concave hull on systems with geos >=3.11.0 2023-10-09 12:14:20 +02:00
Alexander Bruy
5ad4119b19 another attempt to fix test 2023-10-09 12:14:20 +02:00
Alexander Bruy
5097992445 try to fix tests 2023-10-09 12:14:20 +02:00
Alexander Bruy
61b69179af [processing] port concave hull algorithm to C++ 2023-10-09 12:14:20 +02:00
Alexander Bruy
451d1ba5ce [processing] port delaunay triangulation algorithm to C++ 2023-10-09 12:14:20 +02:00
Alexander Bruy
d8243141cc [processing] port voronoi polygons algorithm to C++ 2023-10-09 12:14:20 +02:00
Alexander Bruy
3c1f510115 add modeler support and deprecate Python implementation 2023-09-25 14:14:42 +03:00
Jean Felder
1778cbbb0e processing: Fix some gdal raster tests for gdal 3.6 and above
This has been tested with GDAL 3.4, 3.5, 3.6 and 3.7.
2023-08-19 06:18:53 +10:00
Jean Felder
2af3c42b87 processing: Fix some gdal vector tests for GEOS 3.11 and above
This has been tested with GEOS 3.10, 3.11 and 3.12.
2023-08-19 06:18:36 +10:00
Jean Felder
cd3bcd6746 gdal_algorithm_vector_tests: Remove empty line at the end of file 2023-08-19 06:18:36 +10:00
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
c547f56776 [feature] Add 'DTM Filter (slope-based)' algorithm for filtering a
digital elevation model in order to classify pixels into ground
and non-ground cells

This is a port of the SAGA "DTM Filter (slope-based)" tool to a native
QGIS algorithm.

It also serves as a nice reference algorithm for raster based tools
which operate on a neighbourhood of pixels.
2023-07-13 14:10:00 +10:00
Nyall Dawson
4647cfccef [processing] Add "Keep disjoint results separate" option to buffer
algorithm

If checked, then any disjoint parts in the buffer results will be
output as separate single-part features. This setting is designed
to expose a similar functionality as is available for the 'dissolve'
algorithm.

Sponsored by City of Canning
2023-03-08 18:08:43 +10:00
Nyall Dawson
c9a2a5efa8 Fix some overlay algorithms output multipoint geometries but
output layer is single point, causing insertion errors

Fixes #49456
2022-10-20 13:59:49 +10:00
Nyall Dawson
9d1fc68c1d Get remaining processing tests working on newer systems 2022-08-10 16:33:18 +10:00
Nyall Dawson
9f07b782f2 More working processing tests on newer systems 2022-08-10 16:33:18 +10:00
Nyall Dawson
6e6759f482 Fix some more processing tests on newer libraries 2022-08-10 16:33:18 +10:00
Nyall Dawson
7b7d0ba77e When running hub lines tool in geodesic mode, always drop m/z values
Otherwise we end up with geometries full of nan z/m values, which
are problematic and can't be used with newer GDAL versions
2022-08-10 16:33:18 +10:00
Nyall Dawson
44c06b7be4 Get some processing tests passing on newer libraries 2022-08-10 16:33:18 +10:00
Nyall Dawson
53a86528f1 More processing test fixes 2022-08-08 17:50:06 +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