4523 Commits

Author SHA1 Message Date
Nyall Dawson
1942854166 [processing] Port Explode Lines to c++
Aside from the performance benefits, the Python version of this
algorithm occasionally fails on Travis with odd errors. Hopefully
by porting to c++ it will fix these, or at least give useful
debug information in the event of a fail.

Also add support for curved input geometries.
2018-04-06 15:34:52 +10:00
Nyall Dawson
ebab649438 Fix some locator filters show results when no string is entered
and filter prefix is not used
2018-04-06 12:44:56 +10:00
Nyall Dawson
ccb72ebce2 [processing] Fixes for Service Area algorithms
- Output interpolated points when travel cost falls mid-way along
an edge
- Output all intermediate reachable points also
- Make outputting upper/lower bound points optional, and non-default.
Now by default we just output all definitely reachable points and
the interpolated points along edges which correspond to the travel cost.
This allows the output to be used to correctly generate service areas
e.g. by concave/convex polygons and all reachable nodes will be
included in the area.
- Allow algorithm to optionally output a line layer (and make the
point layer optional too, and default to just the line layer output)
containing all reachable line segments (including interpolated
segments of lines when the travel cost sits midway along that
edge). This output is more easily understandably for users.
2018-04-06 12:43:52 +10:00
Nyall Dawson
78a6118ba4 [processing] Fix broken Densify by Interval algorithm, add test
Fix #18640
2018-04-06 11:50:23 +10:00
Matthias Kuhn
4e4c189820 Remove unrequired cast 2018-04-05 22:50:13 +02:00
Matthias Kuhn
6eabb45043 Fix type hints in ModelerParametersDialog attributes 2018-04-05 22:47:23 +02:00
Matthias Kuhn
7c191a46c2 Make modeler text translatable 2018-04-05 22:47:12 +02:00
Matthias Kuhn
0aa8241da4 Avoid catch all exception 2018-04-05 22:46:59 +02:00
Nyall Dawson
8aa9a82d28 [FEATURE][processing] Add algorithm to swap x/y coordinate values
This algorithm swaps the X and Y coordinate values in input
geometries. It can be used to repair geometries which have
accidentally had their latitude and longitude values reversed.
2018-04-05 06:35:13 +10:00
Nyall Dawson
e3bbc35bed [processing] Fix incorrect error string in field mapper algorithm 2018-04-04 05:27:32 +10:00
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