385 Commits

Author SHA1 Message Date
Nyall Dawson
63611b1d8f Port script code functions to c++ classes
Restore logging executed algorithms
2017-06-12 15:59:56 +10:00
Nyall Dawson
ea18e8e9db Resurrect grid polygon algorithm 2017-06-12 07:26:02 +10:00
Nyall Dawson
d8260b8c47 [FEATURE] Port Extract by Expression to new API, allow saving
non matching features to separate output
2017-06-12 07:26:02 +10:00
Nyall Dawson
2d2dff9b4a Restore basic stats alg 2017-06-09 13:17:48 +10:00
Nyall Dawson
448f019e1f Port polygon from layer extent alg to new API 2017-06-06 18:29:09 +10:00
Nyall Dawson
1d2e54d1ba Port delete columns alg to new API 2017-06-06 16:06:27 +10:00
Nyall Dawson
f1511a290c Port clip algorithm to new API 2017-06-06 15:54:10 +10:00
Nyall Dawson
f0f0411e7b Port addautoincrementalfield to new API 2017-06-06 14:46:55 +10:00
Nyall Dawson
dfb687bf64 Port aspect algorithm to new API 2017-06-06 14:39:07 +10:00
Nyall Dawson
d53fa8d2af Port another alg to new API 2017-06-06 12:36:10 +10:00
Nyall Dawson
d7aa3f5f7c [processing] Change explicit encoding string parameters to more
flexible QVariantMap creatOptions parameters which include an
optional fileEncoding value

More flexible, allows sinks to be created using any creation
option which is passed to the underlying provider
2017-06-06 08:00:28 +10:00
Nyall Dawson
379d060de4 Resurrect another Python QGIS algorithm 2017-06-06 07:41:20 +10:00
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