724 Commits

Author SHA1 Message Date
Andrea Giudiceandrea
44744e2679 [processing] Fix NODATA parameters in GDAL Merge alg
Set NODATA_INPUT and NODATA_OUTPUT as QgsProcessingParameterNumber.Double parameters, instead of QgsProcessingParameterNumber.Integer
2021-09-11 06:15:47 +10:00
AlisterH
c1c068b28b
Add tags for gdal_edit processing algorithm (#43484) 2021-06-03 07:03:23 +10:00
nicogodet
bf9efccff2
Fix GDAL overwrite and some minor fixes (#42447)
Automatically overwrite files in some gdal algorithms, in order to match the behavior of other processing algorithms which automatically overwrite existing files

Fixes #42248
2021-03-25 09:17:41 +10:00
Andrea Giudiceandrea
e11b7f0230 [processing][gdal] Fix parsing of creation options for Roughness alg 2021-03-16 11:36:09 +10:00
talledodiego
0e6ffc7045
[gdal] rasterize - Include the possibility to use Z of feature to extract burn values 2021-03-03 11:16:13 +10:00
Nyall Dawson
2cbffdd9bc [processing][gdal] Partially revert 570972b22707533
- gdal_calc command is gdal_calc.py, not gdal_calc
- commandName() method is used for more than just the command line
generation, so move extension handling to getConsoleCommands() only
2021-02-27 11:43:40 +10:00
Nyall Dawson
fe566bcc09
Merge pull request #41847 from nyalldawson/fix_41839
Fix many issues in gdal algs...
2021-02-27 09:34:39 +10:00
Nyall Dawson
6a7e4c133e [processing][gdal] Fix escaping of connection string in OGR to postgis
alg

Fixes #41839
2021-02-26 12:05:53 +10:00
Nyall Dawson
964431a0cc [processing][gdal] Fix SQL command in points along lines algorithm 2021-02-26 12:05:41 +10:00
Nyall Dawson
c5dd8714a8 [processing] Fix escaping of srcnodata argument in Build Virtual Raster
alg
2021-02-26 12:02:59 +10:00
Nyall Dawson
33b0dbe761 [processing][gdal] Fix escaping of delimiter parameter in retile
algorithm
2021-02-26 11:50:51 +10:00
Nyall Dawson
0a6436402d [processing][gdal] Don't insert 'temporary file' strings in command for non-specified optional outputs 2021-02-26 11:47:37 +10:00
Nyall Dawson
ea113cbf4a [processing][gdal] ";" characters must be escaped when running gdal
commands
2021-02-26 11:30:49 +10:00
Andrea Giudiceandrea
d43245c6ac
[processing] Fix sort order of output raster extensions list
to make it easier to find the extension in the long list of available extensions in the "Save to File" window of the GDAL provider algorithms
2021-02-25 07:49:02 +01:00
Andrea Giudiceandrea
91c8b23e90
[processing] Fix GdalUtils getSupportedRasters()
in order to correctly retrieve multiple extensions from GDAL drivers metadata DMD_EXTENSIONS instead of DMD_EXTENSION. See https://gdal.org/development/rfc/rfc46_gdal_ogr_unification.html#drivers-and-driver-registration
2021-02-25 07:36:19 +01:00
Andrea Giudiceandrea
ae097d41c7
[processing] Fix GDAL supported output raster extensions
Fix GdalAlgorithmProvider supportedOutputRasterLayerExtensions(self) in order to correctly return GdalUtils.getSupportedOutputRasterExtensions() instead of GdalUtils.getSupportedRasterExtensions()
2021-02-25 07:18:41 +01:00
Nyall Dawson
e11801d34e Require Proj version 6 or later, drop old proj 4 compatibility code 2021-02-23 12:47:04 +10:00
Juergen E. Fischer
61b6cc21e8 followup 570972b227075335f2b4a6ca2d5e6cb00330a0f6 2021-02-21 19:26:44 +01:00
Juergen E. Fischer
570972b227 processing/gdal: use batch files instead of modules on windows 2021-02-21 17:46:14 +01:00
Nyall Dawson
af0fb8bb87 [processing] Fix GDAL algorithms hang when gdal command is not available to run 2021-02-21 15:04:31 +10:00
Evan Derickson
0a3b7d36f8 Make argument setting consistent 2021-02-20 12:26:00 +10:00
Evan Derickson
5302feb2dd Add line break for consistency 2021-02-20 12:26:00 +10:00
Evan Derickson
f87386aa0a Making formatting consistent 2021-02-20 12:26:00 +10:00
Evan Derickson
f3a60ebfe7 Simplify other_fields checker 2021-02-20 12:26:00 +10:00
Evan Derickson
6d5bf2b5c4 Revert f-string conversion 2021-02-20 12:26:00 +10:00
Evan Derickson
26ad7c6a46 Simplify other_field checker 2021-02-20 12:26:00 +10:00
Evan Derickson
97880d74d5 Simplify other_fields detection 2021-02-20 12:26:00 +10:00
Evan Derickson
ef6799fad4 More append thinning
Along with some other loop optimizations
2021-02-20 12:26:00 +10:00
Evan Derickson
0e63799012 Reduce appends 2021-02-20 12:26:00 +10:00
Evan Derickson
dcde81fb1b Thin out unneeded function calls 2021-02-20 12:26:00 +10:00
Nyall Dawson
645397e83d Fix restoring previous GDAL alg raster creation options when running an algorithm from processing history 2021-02-09 15:14:44 +10:00
Nyall Dawson
1e82802d41 Fix SHAPE_ENCODING argument should not always get escaped 2021-02-08 13:23:40 +10:00
Nyall Dawson
988ad72926 Quotes also need to be escaped in gdal argument values 2021-02-08 13:23:40 +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
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
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
admire
2bcddfb4e1 Allow importing vector dimensions greater than 3 and other geometry types 2020-10-24 10:59:06 +10:00
Even Rouault
c6fe79b60d [Processing] GdalUtils: fix quoting of arguments with '&' (fixes #38674) 2020-09-15 07:38:01 +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