3366 Commits

Author SHA1 Message Date
Nyall Dawson
3feda231b8 Update comment 2021-01-12 13:47:19 +10:00
Nyall Dawson
b295bd5803 [processing][grass] Export CRS definitions as WKT2 strings instead
of proj strings wherever possible

Because proj strings are lossy

Fixes #18596
2021-01-12 13:47:19 +10:00
Nyall Dawson
716e74c74a [processing] Use correct means to escape " values in GDAL commands 2021-01-09 07:16:14 +10:00
Nyall Dawson
b14dc49c85 [processing] Catch the gdal process console progress report output
and show algorithm progress bars when running GDAL algorithms
2021-01-09 07:16:14 +10:00
Nyall Dawson
54ec5acf1f [processing] GDAL algorithms can now be canceled!
Previously there was no way to terminate the GDAL process, so if you
accidently got some parameter values wrong it was very easy to end
up with a quasi-endless, non-cancelable gdal algorithm burning away cpu in the
background of a qgis session... ouch!
2021-01-09 07:16:14 +10:00
Nyall Dawson
50b5e563af [processing] Use QgsBlockingProcess instead of subprocess to run GDAL algorithms
This gives us much more flexibility when running the process, as we can
now do things like report feedback messages directly without having
to resort to potentially unsafe event loops regardless of whether the
algorithm is run in the main or a background thread.
2021-01-09 07:16:14 +10:00
Nyall Dawson
e79922b2cc [processing] Return log lines from GdalUtils.runGdal instead of storing
in a class member

The previous approach was NOT thread safe, and it's easy to avoid
2021-01-09 07:16:14 +10:00
Nyall Dawson
02f861c339 [processing] Translate some strings when running gdal algorithms 2021-01-09 07:16:14 +10:00
Julien Cabieces
5c19845d32 Keep only vector layer file path when calling an OTB algorithm 2021-01-06 07:58:17 +10:00
Julien Cabieces
454c4f6eba Fix otbalgorithm when several band are selected 2021-01-06 07:58:17 +10:00
Julien Cabieces
52f2a4d7bc Fix QGIS/OTB interface for field parameters 2021-01-06 07:58:17 +10:00
Julien Cabieces
bb3e1a554c [processing][OTB] deal with parameter type Enum and Band 2021-01-06 07:58:17 +10:00
Alex
b686336513
[bugfix] PTP check for output folder. (#40488)
Fixes #40486
2020-12-22 13:47:03 +10:00
Julien Cabieces
c66d36c16f [processing][OTB] Don't remove parameter if its value is 0 2020-12-07 10:08:02 +10:00
Alexander Bruy
7c1d29c363 override default value only when tool executed from GUI 2020-11-27 16:45:59 +02:00
Alexander Bruy
fe58d4956c [processing] don't set any default value for optional NODATA parameter
in GDAL rastrize algorithm (fix #39752).

As this is optional parameter better to have it not set by default to
avoid unexpected conversion of valid values to nodata values.
2020-11-27 06:51:01 +02:00
Nyall Dawson
347885b58c Astyle 2020-11-24 13:14:08 +10:00
Nyall Dawson
b89d7fd088 [processing][gdal] Don't default to placing each input file in a separate
band in build vrt algorithm

Creating a multi-band vrt is much less common vs creating a mosaic
style vrt, so set the default to the most common use case
and most predictable outcome.
2020-11-24 13:11:37 +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
Giovanni Manghi
49f3fbded4
Fix SAGA Random Terrain tool
Fixes #39945
2020-11-13 05:53:56 +10:00
Denis Rouzaud
eddf6feb45 modernize CMakeLists.txt files 2020-11-12 07:14:46 +10:00
Alexander Bruy
41dc20c2c1
Merge pull request #38841 from rldhont/processing-gdal-clipbyextent
[Processing][GDAL] Clip Raster by extent - override CRS
2020-10-28 18:18:14 +02:00
Alexander Bruy
bfdb99fe65 [processing] correctly escape parentheses in GDAL command (fix #39525) 2020-10-28 06:07:27 +10:00
rldhont
90e9eda818 Processing - GDAL - Raster clip by extent - override CRS 2020-10-27 14:34:44 +01:00
Matthias Kuhn
ae565f180a Fix field type 2020-10-25 07:30:02 +10:00
Matthias Kuhn
be8a69fd9c Ad hoc check for ORDER_EXPRESSION parameter 2020-10-25 07:30:02 +10:00
Matthias Kuhn
84e2d78d7d [processing] Clean migration path to new order_expression parameter 2020-10-25 07:30:02 +10:00
Matthias Kuhn
e95b62d9fa [processing] PointsToPath allow expression for order fields
Allows using `$id` as expression for a csv with ordered values
2020-10-25 07:30:02 +10:00
admire
2bcddfb4e1 Allow importing vector dimensions greater than 3 and other geometry types 2020-10-24 10:59:06 +10:00
Nyall Dawson
ee7bea2305 [processing] Fix execution of "Eliminate selection" through Python
Fixes #38808
2020-10-09 05:17:21 +10:00
Andrea Giudiceandrea
e7e08fd504 Fix grassname of raster layer bands in r_rgb.py 2020-09-24 18:45:59 +10:00
zhanggaolei
3119eb7de2 fixed #38938 Wrong GRASS processing description files 2020-09-23 18:26:40 +10:00
Peter Petrik
24cfedf03f fix #32511 always detect GRASS installation folder on MacOS 2020-09-18 10:56:44 +10:00
Even Rouault
c6fe79b60d [Processing] GdalUtils: fix quoting of arguments with '&' (fixes #38674) 2020-09-15 07:38:01 +10:00
Henry Walshaw
1312cfe599 Add square brackets around the saved expression
When saving a raster expression the generated expression didn't contain square brackets around the letters used for band identifiers. Sticking with the NDVI example:

```
("NIR@1" - "Red@1") / ("NIR@1" + "Red@1")
```

becomes

```
(a - b) / (a + b)
```

Due to the way the expression is parsed these would not be interactie parameters for the user to set as the parameters requre square brackets around the layer tags. This change simply updates the string replacement to include the square brackets so you would get instead:

```
([a] - [b]) / ([a] + [b])
```
2020-09-14 15:58:38 +10:00
Ivan Ivanov
d32369f5ce Translate qgis::fieldcalculator to C++ (simplistic UI) 2020-09-11 10:55:12 +03:00
DiGro
4aefe0d65b Typo corrected. Added one space
Line 120 :  "FieldPyculator code execute error.Global code block can't be executed!\n{0}\n{1}" " should probably be
                  "FieldPyculator code execute error. Global code block can't be executed!\n{0}\n{1}" "
Added one space bewteen "error." and "Gobal"
2020-08-20 06:59:48 +10:00
nirvn
d827faa2c8 [processing] Upgrade the sample raster value algorithm to native C++ 2020-08-17 12:59:34 +07:00
Matthias Kuhn
6124b5c01f
Apply suggestions from code review 2020-08-15 18:59:50 +02:00
Matthias Kuhn
1c6a0a8f6f
Apply suggestions from code review 2020-08-15 18:59:28 +02:00
MrChebur
92914c5339
Apply suggestions from code review
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
2020-08-15 21:56:43 +05:00
Matthias Kuhn
a3c8d6dc29
Update python/plugins/processing/algs/qgis/PointsToPaths.py 2020-08-15 18:55:54 +02:00
MrChebur
e5246da109
Update PointsToPaths.py
spaces deleted
2020-08-15 21:50:47 +05:00
MrChebur
660703d696
Apply suggestions from code review
Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
2020-08-15 21:31:53 +05:00
MrChebur
be613409b4
Update PointsToPaths.py
"line" is replaced by "path"
2020-08-15 21:27:30 +05:00
MrChebur
a30635d71e
Update PointsToPaths.py
Returned missing spaces
2020-08-15 21:20:51 +05:00
MrChebur
dcc7ff921a
New option added: "Close line"
Now this algorithm can check and close the line if necessary.
2020-08-14 18:08:25 +05:00
Sylvain POULAIN
78cea71e00 Missing options for r.neighbors in processing
All options added : https://grass.osgeo.org/grass78/manuals/r.neighbors.html
2020-08-05 06:28:12 +10:00
Andrea Giudiceandrea
ef11ad32b1 Don't load GRASS algs if GRASS is not installed
Fixes qgis_process that incorrectly lists GRASS algorithms among the available processing algs even when GRASS is not installed in the system
2020-08-04 14:51:34 +10:00
rldhont
6c44073ff0 [Processing] Fix GDAL Assign Projection: update QgsRasterLayer crs
Even if the projection is assign, the QgsRasterLayer and the QgsRasterDataProvider was not updated.

The fix reloads the QgsRasterDataProvider's data and updates the QgsRasterLayer's crs.

Fixed #37920
2020-07-31 14:32:48 +02:00