Nyall Dawson
f9887aabf5
[processing] Remove more UseSelectionIfPresent use
2017-06-06 07:41:20 +10:00
Nyall Dawson
b6fb41d4ee
[processing] Don't use vector layers directly as feature sources
...
Instead, parameters evaluate to QgsFeatureSource, which are
used for retrieving features, feature count, crs, wkb type,
etc.
This abstracts away the actual feature source, so that
algorithms may potentially operate from non-layer
feature sources.
It also helps remove the need for specialised QgsProcessingUtils
methods like getFeatures, featureCount, and createSpatialIndex.
Instead the standard API methods using QgsFeatureSources can
be used instead.
2017-06-06 07:41:20 +10:00
Nyall Dawson
5b8affcb56
Rename QgsProcessingParameterOutputVectorLayer to QgsProcessingParameterFeatureSink
2017-06-06 07:41:20 +10:00
Nyall Dawson
770c45da12
Rename QgsProcessingParameterVectorLayer to QgsProcessingParameterFeatureSource
...
Helps abstract away sources to allow non vector layer sources in future
2017-06-06 07:41:20 +10:00
Nyall Dawson
ffce9c9f1e
Add direct method to retrieve QgsFeatureSink from parameter
2017-06-06 07:41:20 +10:00
Nyall Dawson
a951424287
QgsProcessingParameterVectorLayer accepts lists of vector layer types
2017-06-06 07:41:19 +10:00
Nyall Dawson
bdf051a03a
Partially port a trial python alg to new API
2017-06-06 07:41:19 +10:00
Nyall Dawson
416770b197
Remove no longer required _resolveLayers method
2017-06-06 07:41:19 +10:00
Nyall Dawson
ba03f1a13a
Move minimum layer extent calculation to c++
2017-06-06 07:41:19 +10:00
Nyall Dawson
189f804714
Adapt more code to c++ 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
c1d9d57dd2
First working pure c++ algorithms
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
f1c53c3aa4
Refactor Algorithm setParamValues -> getParamValues
...
Now returns a dict of parameter inputs for the algorithm
2017-06-06 07:41:19 +10:00
Nyall Dawson
77ab933788
Move alg character definitions to __init__
2017-06-06 07:41:19 +10:00
Nyall Dawson
168f16276c
Remove help related methods from GeoAlgorithm
2017-06-06 07:41:19 +10:00
Nyall Dawson
1e788556f0
Port getCustomParametersDialog to QgsProcessingAlgorithm
2017-06-06 07:41:19 +10:00
Matthias Kuhn
e3efc2c838
Fix tests
2017-06-02 19:53:37 +02:00
Matthias Kuhn
e2227d9998
Fix QgsPointXY issues
2017-06-02 19:53:37 +02:00
Matthias Kuhn
4ba385d4e1
Fix python plugins
2017-06-02 19:53:37 +02:00
Matthias Kuhn
a9d7630a69
Rename QgsPointV2 to QgsPoint and QgsPoint to QgsPointXY
...
Because 3D coordinates should be the default.
References https://github.com/qgis/qgis3.0_api/issues/36
2017-06-02 19:53:37 +02:00
Salvatore Larosa
48ecee5643
[processing] fix duplicates fields name in field calculator algorithm when switching between layers (followup c2699b4)
2017-05-22 23:29:26 +02: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
Alexander Bruy
c620c7c306
[processing] stop algorithm execution if geometry/feature error occured
...
(fix #11986 )
2017-05-13 09:45:37 +03:00
Nyall Dawson
75a5d5dda1
Remove unused skipAttributeCreation option in QgsVectorLayerExporter::exportLayer
2017-05-12 08:03:23 +10:00
Nyall Dawson
384369c3c4
Rename QgsVectorLayerImport to QgsVectorLayerExporter
...
Since the majority of users of this class will be exporting
an existing map layer to a data provider, the QgsVectorLayerImport
name is misleading and suggests that this class is designed
just to bring layers "into" QGIS.
Explicitly naming the class "Exporter" should help API users
discover this class.
Also cleanup API and improve docs
2017-05-12 08:02:51 +10: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
c2699b4640
[processing] reset variables list in field calculator on layer change ( fix #15633 )
2017-05-04 10:14:37 +03:00
Nyall Dawson
1526afecbd
Add missing import
2017-05-03 06:26:12 +10:00
Nyall Dawson
15de36ab26
[processing] Always require real QgsFields objects in getVectorWriter,
...
don't allow arrays of fields as inputs
2017-05-03 06:26:12 +10:00
Nyall Dawson
43a86808a2
[processing] Fix vector split alg
2017-05-03 06:25:30 +10:00
Nyall Dawson
8e70aa84fa
Merge pull request #4439 from arnaud-morvan/processing_run_context
...
[processing] Handle context in processing.run
2017-05-03 05:49:06 +10:00
arnaud.morvan@camptocamp.com
e232a0809c
[processing] Handle context in processing.run
...
Fix #15985 (Concave hull)
2017-05-02 17:04:57 +02:00
LOMENEDE Jean-Daniel
dea558b824
fix error message in merge algorithm
2017-05-02 13:39:22 +02:00
Nyall Dawson
877775d2c0
Remove a bunch of unneeded imports
2017-05-02 14:47:58 +10:00
Nyall Dawson
4ed18b112a
Add a bunch of missing QgsProcessingUtils imports
2017-05-02 14:36:23 +10:00
Nyall Dawson
49c688bbe4
Fix use of QgsProcessingUtils.mapLayerFromString
2017-05-02 13:40:49 +10:00
Nyall Dawson
df1ead5ed4
[processing] Remove vector.spatialindex()
...
Use QgsProcessingUtils.createSpatialIndex() instead.
2017-05-02 13:39:36 +10:00
Nyall Dawson
7eb7a7aa01
[processing] Remove vector.bufferedBoundingBox()
...
Use QgsRectangle.grow() instead
2017-05-02 13:27:01 +10:00
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
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