3967 Commits

Author SHA1 Message Date
Nyall Dawson
be962c7d8b Faster command generation in gdal algorithm dialog, by skipping forced incompatible layer exports 2017-12-08 14:50:03 +10:00
Nyall Dawson
96c7e6e0a6 [processing][gdal] Cleanup some code, add method to customise
generated command based on whether the algorithm is actually
executing or just being displayed in the UI as a command
2017-12-08 14:09:08 +10:00
Mathieu Pellerin
ad54073b1e
[processing] list native QGIS algorithms first in modeler dialog 2017-12-05 11:52:06 +07:00
Nyall Dawson
5a818707c7 Update tests 2017-12-03 17:06:20 +10:00
Nyall Dawson
5b5560aaf9 Set default method for check validity alg 2017-12-03 15:16:17 +10:00
Nyall Dawson
5b05699fc9 Add some tags to check validity algorithm 2017-12-03 14:58:21 +10:00
Nyall Dawson
e12621ce2a Add API method to remove duplicate nodes from geometries
Removes duplicate nodes from the geometry, wherever removing the
nodes does not result in a degenerate geometry.

By default, z values are not considered when detecting duplicate
nodes. E.g. two nodes with the same x and y coordinate but
different z values will still be considered duplicate and one
will be removed. If useZValues is true, then the z values are
also tested and nodes with the same x and y but different z
will be maintained.

Note that duplicate nodes are not tested between different
parts of a multipart geometry. E.g. a multipoint geometry
with overlapping points will not be changed by this method.

The function will return true if nodes were removed, or false
if no duplicate nodes were found.

Includes unit tests and a processing algorithm which exposes
this functionality.
2017-12-03 14:58:21 +10:00
Nyall Dawson
928afdd8c5 Fix geometry snapper sometimes creates unwanted overlapping segments
when snapping line layers

Because the default behavior of the snapper is to insert extra
vertices into the snapped geometry in order to make it 'follow'
the reference geometries exactly, this can result in unwanted
results for line layers where the resultant snapped layer
has overlapping line segments.

Since we can't always know what the desired result is that the
user wants (maybe they do want overlapping lines), instead
give them control over the result by exposing extra enum
options which never insert extra vertices.
2017-12-03 07:10:42 +10:00
Nyall Dawson
1625d1fa2c Disable direct parameter value input when data defined override is set 2017-12-02 11:17:19 +10:00
Nyall Dawson
8c9147eabd [processing] Make set m value accept dynamic m values 2017-12-02 11:17:19 +10:00
Nyall Dawson
d1a71f0971 Update algorithms for new API 2017-12-02 11:17:19 +10:00
Nyall Dawson
58ab507717 Fix failing test 2017-12-02 11:17:18 +10:00
Nyall Dawson
4b464f3d68 [processing] Allow data defined z value for "set z value" algorithm
Allows easy setting of z from an existing height attribute!
2017-12-02 11:17:18 +10:00
Nyall Dawson
901dae1110 [processing] Expose data defined button for dynamic numeric parameters
When running algorithms through the toolbox, which have dynamic
numeric parameters, add a data defined property override button
next to the widget so that users can set the overrides for these
parameters.

Previously this was available only in the backend, but not
exposed anywhere in the GUI.

Note that currently no algorithms support dynamic parameters,
so don't expect to see this everywhere. It's also only available
in toolbox/batch processing modes, not in models.
2017-12-02 11:17:18 +10:00
Nyall Dawson
6b23e1f299
Merge pull request #5600 from Gustry/sortby
add order by expression algorithm
2017-12-02 11:43:48 +11:00
Nyall Dawson
1c1de3a88b [processing] Fix optional numeric parameters cannot be cleared
Without this change optional numeric parameters have no way to
be cleared in the GUI - they are always forced to have a value

Fixes #17471 - but I've noticed that many optional numeric
GRASS parameters have a non-null default value. These may
need to be investigated and manually changed to None defaults
in the description files.
2017-12-01 20:42:38 +11:00
Nyall Dawson
db855029de Fix not-set defaults for numeric parameters were converted to 0 2017-12-01 20:42:38 +11:00
Nyall Dawson
6b56565f89 Show nicer tooltips for numeric processing parameters
With min/max and default values (when set)
2017-12-01 20:42:38 +11:00
Nyall Dawson
8303b94685 [processing] Fix optional layer parameters are filled by default
Refs #17471

Not a full fix for 17471 - that requires handling of optional
numeric values too
2017-12-01 20:42:38 +11:00
Nyall Dawson
8026008ae7 [processing] group option for autoincrement field algorithm 2017-12-01 20:42:38 +11:00
Nyall Dawson
f6e63d7f4c Fixes and cleanups to algorithm dialogs 2017-12-01 18:15:40 +11:00
Nyall Dawson
ce170918c9 Start moving processing algorithm dialog to c++
In an attempt to avoid Python global interpreter locks which
block the UI thread.
2017-12-01 18:15:40 +11:00
Nyall Dawson
c12770d041 Indentation 2017-12-01 10:00:42 +11:00
Nyall Dawson
d7111b7849 Standardise some algorithm names 2017-12-01 10:00:42 +11:00
Nyall Dawson
e1ce7dda70 Show algorithm ID in tooltip in toolbox 2017-12-01 10:00:42 +11:00
Etienne Trimaille
7303297d7f add some notes in processing test readme 2017-11-30 15:22:13 +01:00
Etienne Trimaille
1b8faa2a79 add sort by expression algorithm 2017-11-30 15:22:13 +01:00
Tim Sutton
f6acf37637
Fix processing errors on startup and execution on MacOS (#5769) 2017-11-30 07:17:12 +02:00
nirvn
f5702abae9 [processing] fix DlgModeler.ui layout warnings 2017-11-30 12:12:23 +07:00
Matteo Ghetta
a10e753820 processing test for difference algorithm (#5764) 2017-11-29 15:25:30 +01:00
Alexander Bruy
e0290a9f23
Merge pull request #5745 from alexbruy/processing-cleanup
Processing cleanup
2017-11-29 09:44:55 +02:00
Nyall Dawson
62dbf4ce26 GML is too fragile, but shapefiles, you've never let me down... 2017-11-29 15:50:58 +11:00
Nyall Dawson
f8bad4977d [processing] Make split with lines output single part features
instead of keeping parts collected into a single multipart feature
2017-11-29 15:50:58 +11:00
Alexander Bruy
d65c036781 [processing] remove old params from wrappers 2017-11-28 12:27:45 +02:00
Alexander Bruy
3d4a59bb8b [processing] cleanup files from unused code and remove some files 2017-11-28 12:27:45 +02:00
Alexander Bruy
ee8435a789 [processing] remove unused files 2017-11-28 12:27:45 +02:00
Alexander Bruy
0059b2b692 [processing] remove Python 2 compatibility layer 2017-11-28 12:27:45 +02:00
Nyall Dawson
7a09f0890e
Merge pull request #5727 from nyalldawson/sublayer
Fix ogr sublayer handling of names containing ":"
2017-11-28 14:47:34 +11:00
Nyall Dawson
c0e732b799 [processing] Add QGIS 3d provider
Adds a new QGIS processing provider for 3d algorithms, available
only when QGIS is built WITH_3D

Currently includes only a single algorithm for tesselating geometries,
which exposes the functionality of QgsTesselator to processing.

Like the native c++ algorithm provider, algorithms in the 3d
provider are transparently merged with the other QGIS providers
(i.e. they aren't separated into their own group)
2017-11-27 06:54:29 +11:00
Nyall Dawson
bb63a83e04 Add missing output from package algorithm 2017-11-27 06:38:21 +11:00
Nyall Dawson
4b9986eb8c [processing] Add a generic map layer output type
For occasions when an algorithm creates a map layer, but the type
is not known in advance (i.e. could be raster OR vector)
2017-11-27 06:38:21 +11:00
Nyall Dawson
a95aecafd6 Fix tests 2017-11-26 16:28:59 +10:00
Nyall Dawson
7451422069 Fix package layers algorithm can't take the outputs from models
Fixes #17544
2017-11-26 12:01:41 +10:00
Etienne Trimaille
cf685f0f5f add missing import operator (#5724) 2017-11-24 22:03:19 +07:00
Nyall Dawson
14531964a8
Merge pull request #5719 from nyalldawson/translate_z
geometries: translate Z/M
2017-11-24 22:12:11 +11:00
Mathieu Pellerin
97f749e6b4
[processing] fix error when adding refactor fields alg in empty model
(fixes #17421)
2017-11-24 18:04:50 +07:00
Mathieu Pellerin
c2b3ac5624
[processing] order 3rd party provider groups (#5723) 2017-11-24 17:58:43 +07:00
nirvn
a477ea3ae4 [processing] move grass & saga version number to tooltips 2017-11-24 17:16:25 +07:00
Nyall Dawson
b786ed03b2 Add a unit test 2017-11-24 16:26:41 +10:00
Nyall Dawson
ff900c0b05 [processing] Make translate algorithm native
And add option to translate z/m values
2017-11-24 16:18:13 +10:00