4563 Commits

Author SHA1 Message Date
Nyall Dawson
08d30c3b9f [processing] Add method for algorithms to preprocess parameter values
Allows algorithms to pre-processes a set of parameters, allowing the
algorithm to clean their values.

This method is automatically called after users enter parameters, e.g.
via the algorithm dialog. This method should NOT be called manually
by algorithms.
2018-04-03 18:36:39 +10:00
Nyall Dawson
d164f8ff98 [processing] Disable cancel button for GDAL algorithms
The provider doesn't support cancelation
2018-04-03 13:40:48 +10:00
Rashad Kanavath
3408e02c46 [processing] create and manage label in WidgetWrapper
ModelerParametersDialog and ParametersPanel have to keep list of
wrappers only. widget and label( if needed) are created through
WidgetWrapper.createLabel()
2018-04-03 06:09:44 +10:00
Nyall Dawson
a82bffcc72 String capitalization 2018-04-02 17:57:03 +10:00
Nyall Dawson
ad3f1781d7 [processing][needs-docs] Rename "Add Script from Template" to
"Create New Script from Template"
2018-04-02 17:57:03 +10:00
matteo
11c0e562bf fix indentation 2018-03-31 18:30:40 +11:00
matteo
925d45dffb new LoadFromTemplate action in toolbar dropdown 2018-03-31 18:30:40 +11:00
matteo
deaeaa6e97 remove useless action from script editor 2018-03-31 18:30:40 +11:00
matteo
61c3b485ef remove load template button action and fix double separator 2018-03-31 18:30:40 +11:00
matteo
0abd3fd226 add shortHelpString in script template 2018-03-31 18:30:40 +11:00
matteo
966bb1734f Renamed script_template.py to ScriptTemplate.py 2018-03-31 18:30:40 +11:00
matteo
b72f0f0e90 Minor changes in Dialog 2018-03-31 18:30:40 +11:00
matteo
ca210dcad7 removed useless dots in UI 2018-03-31 18:30:40 +11:00
matteo
cdac11f132 Typo and remove shortcut 2018-03-31 18:30:40 +11:00
matteo
78ce8dde32 other indentation fixes 2018-03-31 18:30:40 +11:00
matteo
4f55c29cab fix indentation 2018-03-31 18:30:40 +11:00
matteo
4fe067a22c script template with basic function 2018-03-31 18:30:40 +11:00
matteo
46d59b7177 [processing][feature] load default script from template 2018-03-31 18:30:40 +11:00
Nyall Dawson
8e08bda46c [processing][grass] Fix incorrect path calculation for grass binary 2018-03-27 07:10:37 +11:00
Nyall Dawson
bec878f6f9 [processing][grass] Fix error after running grass algorithms 2018-03-27 07:10:37 +11:00
Nyall Dawson
49d585ef17 [processing][gdal] Move method to write input files to text file to GdalUtils 2018-03-22 06:46:39 +11:00
Nyall Dawson
b17feaaa97 [processing][gdal] Expose no data options for gdal merge algorithm 2018-03-22 06:46:39 +11:00
Nyall Dawson
1d8ecaf79a [processing][gdal] Use a text file for input file list to gdal_merge
Otherwise command fails when attempting to merge many rasters due
to length of command line. Now the algorithm uses the same approach
as buildvrt and creates a text file containing the names of the
rasters and then passes this to the gdal_merge command

Fixes gdal merge algorithm fails with many input files
2018-03-22 06:46:39 +11:00
Nyall Dawson
00bb177f3d [processing][gdal] Fix parsing of creation options
Creation options must be specified one at a time - the
current approach causes them to be specified once embedded
in quotation marks, which is not valid input for gdal
2018-03-21 18:36:28 +11:00
Nyall Dawson
044470d38f [processing][gdal] Skip expensive parameter validation when just showing command in dialog 2018-03-21 15:30:18 +10:00
Nyall Dawson
e0255b305d [processing] Fix intersect always selected in Join by Location in modeler
Fixes #18489
2018-03-21 09:19:34 +11:00
Nyall Dawson
5436ce9a35 [processing] Avoid grass 'duplicate parameter' warning 2018-03-21 09:14:23 +11:00
Nyall Dawson
ff6ea33686 [processing] Fix broken Aggregate algorithm
Fixes #18349
2018-03-20 08:06:38 +11:00
Alexander Bruy
092557b16a [processing] correctly handle inactive providers in the modeler (fix #18461) 2018-03-19 11:55:10 +02:00
Nyall Dawson
732c5260cc [processing] Fix Concave Hull algorithm, add tests
Fixes #18475
2018-03-19 12:00:30 +11:00
Nyall Dawson
7a28181e7f Skip some attributes in import photos test
These absolute paths cannot be tested in processing algorithm tests
2018-03-16 15:08:29 +11:00
Nyall Dawson
fa2c5aebb7 [FEATURE][processing] Import geotagged photos algorithm
This implements a new "import geotagged photos" algorithm
for processing. It allows selection of a folder which it
will scan for jpg files which have been geotagged and
creates a PointZ layer with the result, with attributes
for photo path, altitude, direction and timestamp.

Optionally the scan can be recursive and you can create
an optional table of photos which could not be read
or which were missing geotags.

The algorithm automatically sets the output table to
use an external resource widget to display the linked
photos in the attribute form.

[ALGCHANGE]
2018-03-16 15:08:29 +11:00
Nyall Dawson
87e8432644 [processing] Fix Points to Paths terminates when an order by
field is empty
2018-03-16 14:30:30 +11:00
Nyall Dawson
d907ba05fc [processing] Expand 'algorithm' group in history on load
Since all the useful stuff is in that group, you ALWAYS need
to expand it anyway!
2018-03-15 16:57:31 +10:00
Nyall Dawson
bd1d87ed86 [processing] Allow algorithms to set layer post-processors for
execution on generated layers after the algorithm (or parent
model) completes

This commit adds an interface for layer post-processing handlers
for execution following a processing algorithm operation.

Post-processing of a layer will ONLY occur if that layer is set
to be loaded into a QGIS project on algorithm completion.

Algorithms that wish to set post-processing steps for generated
layers should implement this interface in a separate class
(NOT the algorithm class itself!) and implement a method
to handle the layer post-processing.

This method always runs in the main thread and can be used to
setup renderers, editor widgets, metadata, etc for the given layer.

Fixes #17961
2018-03-15 17:55:25 +11:00
Nyall Dawson
654a4a4af6 [processing] Fix algorithm progress bar resets to 0 when an algorithm
reports a non-fatal error

Fixes the "flashy" progress bar when an algorithm encounters a lot
of errors.
2018-03-15 13:43:01 +11:00
Alexander Bruy
88e8acddf8
Merge pull request #6571 from slarosa/fix_18183
[processing] SAGA "output extent" should not be mandatory (fix #18183)
2018-03-13 08:45:45 +02:00
Nyall Dawson
251e1d5352 [FEATURE][processing] Add line sinuosity to "Export Geometry Info"
Adds line sinuosity and straight distance to the stats calculated
by "Export Geometry Info"

Fixes #12376
2018-03-12 14:58:04 +11:00
Nyall Dawson
f06b3691c5 More spelling fixes 2018-03-12 14:32:17 +11:00
Ari Jolma
08332e73a2 [processing][gdal] color relief alg: add the default color option, i.e., no switches 2018-03-12 10:43:47 +11:00
Nyall Dawson
8df954d6b8 [processing] Port Delete Holes algorithm to c++, allow dynamic
min area parameter
2018-03-12 10:41:22 +11:00
Salvatore Larosa
23172a101e [processing] Fixes #18183: SAGA "output extent" should not be mandatory 2018-03-10 22:08:07 +01:00
Juergen E. Fischer
e1ad1cb473 more translation string fixes 2018-03-10 12:23:45 +01:00
Alexander Bruy
7eb7e9361e Revert "[processing] replace QCoreApplication.translate() with tr() in"
This reverts commit 007903494582b1e71273e7b801b928d32eb2f330.
2018-03-09 18:31:10 +02:00
Juergen E. Fischer
ad4d0a17d5 processing: make error messages moved to message bar translatable again (followup 6e2288dcc) 2018-03-09 17:21:12 +01:00
Alexander Bruy
0079034945 [processing] replace QCoreApplication.translate() with tr() in
ParametersPanel class
2018-03-09 14:57:37 +02:00
Ari Jolma
b0cd3fb5f0 Translate strings before making changes to them. 2018-03-09 18:10:23 +11:00
Alexander Bruy
a9441218c1 [processing] fix parameters IDs (follow up #6535) 2018-03-08 11:10:20 +02:00
Nyall Dawson
5710709c72 Add extra hash to processing hillshade test
At this stage the raster processing tests just test that the
algorithm executes, and generates an output file - there's
no way to validate that the provided hashes are valid
outputs or not
2018-03-08 09:40:07 +10:00
Matthias Kuhn
c3a843619f Use flags for parameter type extra info 2018-03-07 09:00:33 +11:00