373 Commits

Author SHA1 Message Date
Nyall Dawson
f9887aabf5 [processing] Remove more UseSelectionIfPresent use 2017-06-06 07:41:20 +10:00
Nyall Dawson
bdf051a03a Partially port a trial python alg to new API 2017-06-06 07:41:19 +10:00
Nyall Dawson
0c3ad14c79 Adapt more python code to new API 2017-06-06 07:41:19 +10:00
Nyall Dawson
ef59d0c454 Port parameter checking to c++ 2017-06-06 07:41:19 +10:00
Nyall Dawson
4cb7d18b1c Push parameters into processAlgorithm and related functions 2017-06-06 07:41:19 +10:00
Nyall Dawson
2da85f8771 Temporarily deactivate all processing providers/algorithms
While the processing API is in such a state of flux it's
become unmaintainable to port these algorithms change-by-change.
Instead, disable them all until the API is fixed, and then we
can port them algorithm by algorithm and reactivate each
test in turn.
2017-06-06 07:41:19 +10:00
Alexander Bruy
84871ce00d [processing] temporarily disable singleparts to multiparts test 2017-05-17 08:26:47 +03:00
Alexander Bruy
fe7c981aea [processing] handle NULL values in the single to multi algorithm (fix #15822) 2017-05-16 13:43:42 +03:00
Alexander Bruy
11475c621d Revert "Merge pull request #4562 from alexbruy/processing-singletomulti-3"
This reverts commit e3d79a1fe940b5d813b5f79c51b43393d085bb16, reversing
changes made to 3f7f95ee262ea3646d61600c21faed0866bc70b0.

Reverting again, as Travis started failing after merging PR (with all
test passed) into master branch
2017-05-16 13:42:47 +03:00
Alexander Bruy
b56e46dad4 [processing] handle NULL values in the single to multi algorithm (fix #15822) 2017-05-16 10:06:26 +03:00
Matthias Kuhn
aa021bef0c Merge pull request #4307 from ghtmtt/proc_tests
[processing] other qgis test, clean commit
2017-05-10 09:07:59 +02:00
Nyall Dawson
6aa10c6817 [processing] Cleanup some layer/writer related handling
Ensure that layers created by QgsProcessingUtils::createFeatureSink
can always be retrieved using QgsProcessingUtils::mapLayerFromString
2017-05-09 15:29:41 +10:00
Nyall Dawson
06c4dea7ff [processing] Remove vector.createVectorWriter
Use QgsProcessingUtils.createFeatureSink instead
2017-05-07 08:02:54 +10:00
Alexander Bruy
429e67e0f9 [processing] remove stuff related to R provider 2017-05-02 12:39:26 +03:00
Nyall Dawson
877775d2c0 Remove a bunch of unneeded imports 2017-05-02 14:47:58 +10:00
Nyall Dawson
49c688bbe4 Fix use of QgsProcessingUtils.mapLayerFromString 2017-05-02 13:40:49 +10:00
Nyall Dawson
f84d703234 Add method QgsProcessingUtils::mapLayerFromString
Algorithms and other processing code should use this method
(instead of dataobjects.getLayerFromString) to
retrieve layers from a string, as it considers the processing
context and allows resolving strings to temporarily stored layers.

This permits processing models to function correctly when
intermediate results are stored as memory layers. Subsequent
model algorithms can then access these temporary layers as inputs.
All temporary layers will be removed when the context object
is destroyed after the model algorithm is run.
2017-05-02 12:33:04 +10:00
Alexander Bruy
7ee1cbfaae Revert "[processing] handle NULL values in the Singleparts to multiparts (fix #15822)"
This reverts commit a944f7c4c1010767abb811200686e327040c2d32.
2017-05-01 10:53:15 +03:00
Alexander Bruy
5c8365c544 Revert "Merge pull request #4458 from arnaud-morvan/processing_fix_single_to_multi_test"
This reverts commit 77d95905a51db6c2d938c736e34da246ad6e0f50, reversing
changes made to 6fd45f0ef5968e2471421a21f81017c9c86f3fb7.
2017-05-01 10:53:08 +03:00
arnaud.morvan@camptocamp.com
adf5b6f0c5 [processing] Fix qgis:singlepartstomultipart test 2017-04-30 22:41:42 +02:00
Alexander Bruy
80c8875275 fix failing test 2017-04-30 20:29:39 +03:00
Alexander Bruy
a944f7c4c1 [processing] handle NULL values in the Singleparts to multiparts (fix #15822) 2017-04-30 14:31:52 +03:00
Juergen E. Fischer
b29a10eeb7 hub.qgis.org moved to issues.qgis.org 2017-04-29 23:34:27 +02:00
Nyall Dawson
fd2c18ee16 Refactor processing writer to use QgsFeatureSink, and to store
temporary output layers in the provided processing context

Should fix loss of intermediate memory layers when running
a multi-step model
2017-04-26 17:38:40 +10:00
Nyall Dawson
f247a7cda3 Add c++ optimised uniqueValues method which respects processing context
Remove processing vector.uniqueValues/vector.getUniqueValues
and port usage to c++ method

Should be much faster than the python method, as the c++ method takes
advantage of handing off the unique values calculation to the
provider source whenever possible
2017-04-26 12:53:35 +10:00
Nyall Dawson
91679b3cbd [processing] Don't use config values for invalid geometry handling in tests 2017-04-26 12:53:35 +10:00
Nyall Dawson
845027d0a3 Fix failing tests 2017-04-26 12:53:35 +10:00
Nyall Dawson
b067bd786a Rename UseSelection -> UseSelectionIfPresent, clarify docs 2017-04-26 12:53:35 +10:00
Nyall Dawson
427c3b1684 Remove vector.features
Use QgsProcessingUtils.getFeatures instead
2017-04-26 12:53:35 +10:00
Nyall Dawson
8cf1617f5d Use context to control vector.features() 2017-04-26 12:53:35 +10:00
Nyall Dawson
3f137e123d Add context argument to other vector methods 2017-04-26 12:53:35 +10:00
Nyall Dawson
adc7cf0ec2 Add context argument to vector.features 2017-04-26 12:53:35 +10:00
Nyall Dawson
6b260ffee6 Remove deprecated assertEquals use 2017-04-25 19:00:13 +10:00
matteo
01f647eef0 try after travis failing 2017-04-11 10:00:27 -05:00
matteo
9a0ffbdc1e remove selections tests 2017-04-11 09:21:35 -05:00
matteo
410e8e7aff Merge branch 'master' into proc_tests 2017-04-11 09:15:13 -05:00
Nyall Dawson
11d71d98bc Attempt to fix failing GDAL test 2017-04-07 13:34:06 +10:00
Nyall Dawson
5a6f11d52e Some cleanups 2017-04-07 13:21:28 +10:00
Nyall Dawson
4970bb4cd5 Move more algList functionality to QgsProcessingRegistry 2017-04-07 13:21:28 +10:00
Nyall Dawson
377b181c4e Port more processing dataobjects methods to c++
Also
- simplify and add tests
- remove large memory leak (persistant store of all non-project layers)
- remove broken support for direct loading postgres/virtual layers
by string (Python version was very broken and would never match
a postgres/virtual layer)
2017-04-05 19:50:46 +10:00
Nyall Dawson
92249c1a33 [FEATURE][processing] Snap Geometries algorithm can now snap
within the same layer

Allows closure of gaps within a layer
2017-03-30 13:54:05 +10:00
matteo
5e11886086 fix indentation 2017-03-27 13:45:54 -05:00
matteo
a289eb14fa [processing] other qgis test, clean commit 2017-03-27 13:17:21 -05:00
Alexander Bruy
1a46ddbf28 [processing][API] rename runalg() and runandload() to improve
readability
2017-03-22 19:17:12 +02:00
Nyall Dawson
954ee20389 [FEATURE][processing] Add 'does not contain' to Extract By Attribute 2017-03-21 08:58:36 +10:00
Alexander Bruy
e1b1465bb6 move select by attribute script test to QGIS tests 2017-03-16 17:49:40 +02:00
Alexander Bruy
c4052e6ec4 added sample test script which calls two algorithms 2017-03-16 17:48:39 +02:00
Alexander Bruy
a70e73cd74 minor script fixes 2017-03-16 17:48:39 +02:00
Alexander Bruy
394b4f1a87 fix typo 2017-03-16 17:48:39 +02:00
Alexander Bruy
efa9935c5d missed file 2017-03-16 17:48:39 +02:00