1401 Commits

Author SHA1 Message Date
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
2d27784cee Raise exceptions if open options not supported by GDAL version 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
e38849d750 Fix running GDAL algorithms on cloud storage layers
Correctly generate commands when run on eg /vsis3/ layer sources,
and translate credential options to "--config KEY VALUE" arguments
for GDAL commands
2024-06-27 13:07:25 +10:00
Nyall Dawson
2ab2d34947 Correctly handle open options for raster GDAL algorithm inputs
And handoff to GDAL command when command supports them
2024-06-27 13:07:25 +10:00
Nyall Dawson
18efe655e9 Pass vector layer open options over to GDAL command
Ensures that processing tools which use vector layers with open
options work correctly, respecting the layer's open option settings
2024-06-27 13:07:25 +10:00
Nyall Dawson
36e3c43f84 Make getOgrCompatibleSource API more flexible 2024-06-27 13:07:25 +10:00
Nyall Dawson
dcacebaeaa Cleanup API for GDAL processing provider uri conversion 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
Even Rouault
07067d37b5 python/plugins: turn on GDAL exceptions to avoid deprecation warning
Fixes #57344
2024-05-22 13:34:35 +10: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
c997d5a8d9 Fix test 2024-03-19 13:44:02 +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
Andrea Giudiceandrea
42f3a60743 Apply suggestions from code review 2024-02-18 06:52:52 +10:00
Andrea Giudiceandrea
5eb58df57e Fix typo 2024-02-18 06:52:52 +10:00
Andrea Giudiceandrea
dbdf35be77 gdal:fillnodata Skip testing NO_MASK parameter if GDAL >= 3.4.0 2024-02-18 06:52:52 +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
Nyall Dawson
20d5b34cd3 Rename test_definition_file to definition_file
Otherwise unittest thinks the function is a test itself and runs it
accordingly, and then raises a deprecation warning because
return values are not permitted from test functions
2024-02-12 16:44:06 +10:00
Nyall Dawson
ea3a86508e Rename more references to grass7 to version-less "grass" 2024-02-06 18:31:48 +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
Nyall Dawson
c16a1e2b3d Update enums 2024-01-19 19:44:48 +10:00
Sebastian Gutwein
017bed7e51 fix test 2023-12-26 17:33:06 -05:00
Jean Felder
e0466ab5eb plugins/tests: Port to QgisUnitTests
`unittest.TestCase` is deprecated.
2023-12-12 05:27:30 +10:00
Alexander Bruy
8efd68e117 add test 2023-12-01 08:35:08 +10:00
Nyall Dawson
58e2ddb7e5 Drop OTB Processing provider
As discussed in https://lists.osgeo.org/pipermail/qgis-developer/2023-November/066221.html

This plugin needs to be ported to a 3rd party plugin by a motivated maintainer.
2023-11-27 10:09:16 +10:00
Nyall Dawson
13bc09e706 Remove redundant "import qgis" lines from python files
These were only needed way back in the early days of qgis 3.0
transition, now they have no effect
2023-11-25 07:40:02 +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
Sandro Santilli
bcf83c17b6 Do not pass -projwin to gdal_translate when given rectangle is Null
Update testcase accordingly
2023-10-08 22:40:25 +02:00
Alexander Bruy
3c1f510115 add modeler support and deprecate Python implementation 2023-09-25 14:14:42 +03:00
Alexander Bruy
0e7ab1d29f add tests for GDAL algorithms 2023-09-22 09:40:49 +10: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