Nyall Dawson
0fbf1c2f54
[processing] Remove unused dataobjects.extent method
2017-05-02 13:18:47 +10:00
Nyall Dawson
fa8f667b3e
Fix failing test
2017-05-02 13:15:58 +10:00
Nyall Dawson
b1eecfdba4
Fix resolving memory layers when multiple memory layers are used in model
2017-05-02 12:45:54 +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
rldhont
856046c5f0
[BUGFIX][Processing] Fix spatialite version comparison: import re
2017-04-28 13:47:19 +02: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
1394c28d13
[processing] Move some log handling to c++ class
2017-04-26 13:56:29 +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
86002f3b6f
Move createContext to dataobjects
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
6397386fda
Remove len method from vector.features
...
Use QgsProcessingUtils::featureCount instead
2017-04-26 12:53:35 +10:00
Nyall Dawson
f4f4ca3d83
Raise GeoAlgorithmExecutionException when encountering invalid
...
geometries in QgsProcessingUtils::getFeatures
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
f3cfb8b759
Add invalid geometry handling method to processing context
2017-04-26 12:53:35 +10:00
Nyall Dawson
06a20b935d
Add UseSelection flag to QgsProcessingContext
...
Indicates whether only selected features should be used in
algorithms
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
Nyall Dawson
ee777447a9
[processing] Remove special handling for invalid geometries
...
Instead rely on QgsFeatureRequest method. There's a temporary
loss of the feedback on encountering an invalid geometry
when abort on invalid is set, but that will be resurrected
when all of vector.features is moved to c++
2017-04-25 16:16:17 +10:00
rldhont
1bbc39e887
[BUGFIX][Processing] Fix spatialite version comparison
2017-04-20 15:16:55 +02: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
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
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
8ffdb362cc
Port some processing dataobjects routines to c++
2017-04-05 15:27:17 +10:00
Nyall Dawson
d2a242aa95
Move format handling flags to QgsAlgorithmProvider
2017-04-04 08:15:54 +10:00
Nyall Dawson
6987d7b37c
Port handling of algorithm names to QgsProcessingAlgorithm
2017-04-03 21:17:45 +10:00
Nyall Dawson
dc729c1b5a
Move algorithm group handling to QgsProcessingAlgorithm
2017-04-03 21:17:45 +10:00
Nyall Dawson
26495dbd81
[processing] Move dataobjects.getSupportedOutputVectorLayerExtensions
...
to QgsVectorFileWriter
2017-04-03 15:41:32 +10:00
Alexander Bruy
1a46ddbf28
[processing][API] rename runalg() and runandload() to improve
...
readability
2017-03-22 19:17:12 +02:00
Alexander Bruy
e1a01106dd
[processing][API] rename alglist() to printAlgorithms() to improve
...
readability. Also introduce algorithmsList() call which returns
available Processing algorithms as list
2017-03-22 19:11:43 +02:00
Alexander Bruy
ccbca66492
code cleanups
2017-03-22 16:17:05 +02:00
Alexander Bruy
acd37449f3
[processing][API] rename algoptions() to algorithmOptions()
2017-03-22 15:44:04 +02:00
Alexander Bruy
3e4fb56eea
[processing][API] rename alghelp to algorithmHelp
2017-03-22 15:25:12 +02:00
rldhont
eb2231925f
[BUGFIX][Processing] Vector tools -- add next methods for features iterator
2017-03-15 21:01:21 +01:00
Juergen E. Fischer
c77172ed3d
fix more flake8 warnings
2017-03-05 10:21:24 +01:00
Juergen E. Fischer
f00a87cb8a
update translation strings
2017-03-05 10:21:24 +01:00
Juergen E. Fischer
ecc5bb508e
pep8/pyflakes3 cleanups
2017-03-04 02:38:15 +01:00
Juergen E. Fischer
a10c890383
More QgsSettings updates:
...
* revives WMS
* QgsSettings::clear() added
* section added to QgsSettings::contains()
* type parameter added to sip binding of QgsSettings.value()
* TODO: customization & evis
2017-03-04 02:37:59 +01:00
Alexander Bruy
620ad41150
Merge pull request #4127 from arnaud-morvan/processing_fix_postgis_dberror
...
[processing] Fix infinite recursion in DbError.__str__
2017-02-14 16:40:18 +02:00
arnaud.morvan@camptocamp.com
5028cc76ac
[processing] Fix infinite recursion in DbError.__str__
2017-02-13 15:02:54 +01:00
Juergen E. Fischer
fe75e1f2a6
processing: fix warning
2017-02-11 21:44:32 +01:00
Alexander Bruy
f66646c483
[processing] remove code with GDAL 1.x API as QGIS 3 will require GDAL 2.x
2017-02-09 14:15:31 +02:00
Denis Rouzaud
b119744773
replace cancelling, cancelled and cancellation by canceling, canceled and cancelation, respectively ( #4000 )
...
* replace cancelling and cancelled by canceling and canceled, respectively
see https://github.com/qgis/qgis3_UIX_discussion/issues/19
* replace cancellation by cancelation
2017-01-16 22:27:14 +01:00
Denis Rouzaud
0a63d1f2c2
[spellcheck] properly look into various cases and add more fixes"
2017-01-16 16:39:20 +01:00
Denis Rouzaud
6c74e4ea5d
spelling fixes
2017-01-12 22:01:50 +01:00
Denis Rouzaud
748be8de71
[spelling] replace behaviour by behavior
2017-01-11 11:35:19 +01:00