1681 Commits

Author SHA1 Message Date
Nyall Dawson
11fb72eef7 Only expose a single mapLayerFromString method in QgsProcessingUtils 2017-05-02 12:33:22 +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
12252030ac [processing] uncheck Z-coordinate on layer change in Interpolation
algorithm (fix #10010)
2017-05-01 13:00:23 +03: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
a944f7c4c1 [processing] handle NULL values in the Singleparts to multiparts (fix #15822) 2017-04-30 14:31:52 +03:00
Alexander Bruy
3f669140d5 [processing] fix GRASS commands logging 2017-04-30 14:31:52 +03:00
Alexander Bruy
ed103e59e2 Merge pull request #4445 from arnaud-morvan/processing_fix_rasterize
[processing] fix rasterize dialog openning (fix #16061)
2017-04-30 10:33:29 +03:00
arnaud.morvan@camptocamp.com
bc09875866 [processing] Fix rasterize dialog openning
Fix #16061

Do not pass in getConsoleCommand just to get commandName for shortHelp.
This avoid errors with non initialized parameters.
2017-04-29 21:09:05 +02:00
Alexander Bruy
3450a9ff89 [processing] add multithreading option to warp (fix #15340) 2017-04-29 15:39:49 +03:00
Alexander Bruy
eeba0efc36 followup 1ac053fc26 2017-04-27 10:59:46 +03:00
Alexander Bruy
1ac053fc26 [processing] prevent division by zero in save selected features
algorithm (fix #16431)
2017-04-27 10:54:07 +03:00
Nyall Dawson
0b0ccc9e9d Rename QgsVectorLayer::selectedFeaturesIterator to getSelectedFeatures
It's more in line with QgsVectorLayer::getFeatures, hence a more
discoverable API
2017-04-27 11:16:10 +10: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
e9f13d1ea3 Just use standard QgsMessageLog functionality instead of a dedicated
method for processing
2017-04-26 13:57:06 +10:00
Nyall Dawson
93c32e68ef Fix logging from GDAL 2017-04-26 13:56:30 +10:00
Nyall Dawson
1394c28d13 [processing] Move some log handling to c++ class 2017-04-26 13:56:29 +10:00
Nyall Dawson
a4cd66f8d8 Port some more code to new API 2017-04-26 13:13:08 +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
845027d0a3 Fix failing tests 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
6397386fda Remove len method from vector.features
Use QgsProcessingUtils::featureCount instead
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
dd4f530cfb [processing] Pass context argument to processAlgorithm 2017-04-26 12:53:35 +10:00
volaya
5b8c083da7 indentation fix 2017-04-20 14:47:02 +02:00
volaya
54e30b93f3 improvements for extracts within subsets 2017-04-20 14:03:08 +02:00
Denis Rouzaud
0b0e8a6a89 move QgsFieldModel and QgsFieldProxyModel to core and sipify 2017-04-19 16:44:36 +02:00
Alexander Bruy
737906c55c [processing] add information message when feature skipped 2017-04-19 14:06:16 +03:00
Alexander Bruy
1016119468 [processing] prevent division by zero in random points in polygons fixed 2017-04-19 14:01:41 +03:00
Alexander Bruy
3b5b191730 [processing] fix parsing selection parameter in translate algorithm 2017-04-19 12:23:35 +03:00
Nyall Dawson
cc5b9bfe17 More QgsDistanceArea API cleanups and simplification
- setEllipsoidalMode() was removed. Ellipsoidal calculations are
now enabled whenever a valid ellipsoid() has been set. Set the
ellipsoid to 'NONE' to disable ellipsoidal calculations.

- ellipsoidalEnabled() was removed. Ellipsoidal calculations
are now enabled whenever a valid ellipsoid() is set. Check
willUseEllipsoid() to determine whether ellipsoidal
calculations will be performed.

- sourceCrs() and setSourceCrs() now always take and return
QgsCoordinateReferenceSystem objects. All string/ID based CRS
methods were removed.

- geographic() was removed. This was only used internally
in one place, so was replaced with sourceCrs().isGeographic() instead.

- some largely overlapping measurement functions were consolidated
2017-04-18 08:14:16 +10:00
matteo
16c8dac2ac travis fix 2017-04-12 21:07:30 +02:00
matteo
bca0ca25ee 2 new plots added 2017-04-12 21:07:30 +02:00
matteo
0c5b667986 fix category error and remove np dependency 2017-04-12 21:07:30 +02:00
Nyall Dawson
1bc3b28f94 Fix processing error when grass7 not available 2017-04-07 13:21:28 +10:00
Nyall Dawson
ebd851993a Remove processing specific methods for adding/removing providers
QgsProcessingRegistry methods should always be used instead
2017-04-07 13:21:28 +10:00
Nyall Dawson
fdcf04f9f3 Remove AlgorithmProvider
Totally ported to QgsProcessingProvider
2017-04-07 13:21:28 +10:00
Nyall Dawson
42a614154c Also refactor provider context menu actions and remove from AlgorithmProvider 2017-04-07 13:21:28 +10:00
Nyall Dawson
651355d569 Refactor provider actions and remove from AlgorithmProvider 2017-04-07 13:21:28 +10:00
Nyall Dawson
117260dcf3 Remove activation control from AlgorithmProvider
Split between QgsProcessingProvider and subclasses
2017-04-07 13:21:28 +10:00
Nyall Dawson
ff32054da6 Fix some breakage 2017-04-07 13:21:28 +10:00
Nyall Dawson
3739c3aa51 Move tr out of AlgorithmProvider to subclasses 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
2a1a71574a Move algorithm id (previously commandLineName) to QgsProcessingAlgorithm 2017-04-07 13:21:28 +10:00
Nyall Dawson
b3142a0baf Move provider algorithm handling to QgsProcessingProvider 2017-04-07 13:21:28 +10:00
Borys Jurgiel
e5d10b6946 Fix Refactor Fields error if layer has no features 2017-04-06 10:14:01 +02: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
ee29fa66f9 Use QgsMapLayerComboBox in processing field calculator 2017-04-05 18:39:12 +10:00
Nyall Dawson
8ffdb362cc Port some processing dataobjects routines to c++ 2017-04-05 15:27:17 +10:00
Nyall Dawson
51517fd77e Merge pull request #4311 from nyalldawson/proc_c4
Simple c++ base class for processing algorithms
2017-04-05 06:17:11 +10:00