78 Commits

Author SHA1 Message Date
Nyall Dawson
a658135693 Remove global processing use selection setting 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
28f7a8b7e1 Move expression context generation out of parameters 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
Alexander Bruy
dc5ba8ffe9 [processing] explisitly load outputs as raster or vector depending
on the output type. Don't rely on extension or other indirect attributes
2017-05-26 13:30:23 +03:00
Alexander Bruy
e01b7ef60a [processing] take in account file extension when loading Processing
results (fix #16486)
2017-05-12 17:28:41 +03:00
Nyall Dawson
a8a3cc82ed [processing] Port vector.createVectorWriter to c++
This implements an improved version of vector.createVectorWriter
in QgsProcessingUtils. The improved version relies on the
core class QgsVectorLayerImport to create empty layers,
which:
- reduces duplicate code and reuses the mature QgsVectorLayerImport
routines
- avoids manual conversion of field types to destination provider
field types
- potentially allows any writable provider to be used as a feature
sink for algorithms (e.g. output direct to MSSQL/Oracle/db2). This
should work now - it just needs exposing via UI.
2017-05-07 08:02:53 +10:00
Nyall Dawson
8e5565413f [processing] Remove unused dataobjects.loadList method 2017-05-02 13:20:29 +10:00
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
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
Nyall Dawson
86002f3b6f Move createContext to dataobjects 2017-04-26 12:53:35 +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
26495dbd81 [processing] Move dataobjects.getSupportedOutputVectorLayerExtensions
to QgsVectorFileWriter
2017-04-03 15:41:32 +10: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
Denis Rouzaud
748be8de71 [spelling] replace behaviour by behavior 2017-01-11 11:35:19 +01:00
Martin Dobias
d56a97d4fe Merge QgsMapLayerRegistry into QgsProject
All methods/signals of QgsMapLayerRegistry moved verbatim to QgsProject.
2016-12-10 15:18:12 +08:00
volaya
16da906398 [processing] allow multiple selection of tables 2016-12-05 13:39:38 +01:00
Nyall Dawson
d44bc112e0 [processing] Fix file format combo showing formats in random orders 2016-11-24 09:51:09 +10:00
Alexander Bruy
b6d5f35be2 [processing] cleanup OGR dissolve algorithm code
Avoid double extensions when creating temp files
2016-11-12 13:31:44 +02:00
Alexander Bruy
5991eccb47 [processing] simple test for ogr buffering 2016-11-12 13:31:42 +02:00
Nyall Dawson
b4bca5bb98 [processing] Don't try to force load files which don't exist 2016-11-07 11:11:31 +10:00
Nyall Dawson
d5698be69f Fix some processing breakage 2016-10-31 09:12:39 +10:00
volaya
7a87fb55b0 [processing] don't use full path for naming layers when loaded in dataobjects.load 2016-10-18 16:55:19 +03:00
Matthias Kuhn
576ad138a9 Fix python calls to inexistent methods 2016-10-17 09:31:31 +02:00
Alexander Bruy
e04780a279 add missed comma 2016-10-05 12:38:51 +02:00
volaya
a968fa3dea [processing] use original filename when possible when exporting vector layer
Conflicts:
	python/plugins/processing/tools/dataobjects.py
2016-10-05 12:38:35 +02:00
Juergen E. Fischer
31df84aa6b run 2to3 on source 2016-09-21 23:30:04 +02:00
Nyall Dawson
fe65063c2b Remove many deprecated methods 2016-09-15 18:34:15 +10:00
Alexander Bruy
65db336eaf [processing] move some constants to the dataobjects module 2016-09-02 09:28:45 +03:00
Alexander Bruy
acdde31b3d [processing] more cleanups (follow up 06c4b07222) 2016-08-05 15:05:36 +03:00
Matthias Kuhn
bb79d13e82 Remove deprecated Qgis::WKBType and API cleanup (#3325)
* Remove deprecated Qgis::WKBType and API cleanup

Renames QgsWKBTypes to QgsWkbTypes

Replaces usage of the enums:

* Qgis::WKBType with QgsWkbTypes::Type
* Qgis::GeometryType with QgsWkbTypes::GeometryType

Their values should be forward compatible (a fact that was already
explited up to now by casting between the types)

Renames some SSLxxx to SslXxx and URIxxx to UriXxx

* Fix build warnings and simplify type handling

* Add a fixer to rewrite imports

* The forgotten rebase conflictThe forgotten rebase conflicts

* QgsDataSourcURI > QgsDataSourceUri

* QgsWKBTypes > QgsWkbTypes

* Qgis.WKBGeom > QgsWkbTypes.Geom

* Further python fixes

* Guess what... Qgis::wkbDimensions != QgsWkbTypes::wkbDimensions

* Fix tests

* Python 3 updates

* [travis] pull request caching cannot be disabled

so at least use it in r/w mode

* Fix python3 print in plugins
2016-08-04 09:10:08 +02:00
Alexander Bruy
b3a38f4018 [processing] fix issues with exported layers in GDAL provider 2016-07-26 15:00:26 +03:00
Nyall Dawson
1a2231f10c Rename QGis class to Qgis, for capitalisation consistency 2016-07-21 22:01:38 +10:00
Nyall Dawson
3a005cda36 Indentation 2016-06-02 08:50:27 +10:00
volaya
479ceb36b4 [processing] fixed wrong call to splitext in dataobjects.py 2016-06-01 12:18:33 +02:00
arnaud.morvan@camptocamp.com
01450c5609 [Processing] Compare lower file extension to "shp" 2016-05-30 15:30:00 +03:00
volaya
9c2721b08b [processing] added ‘supported’ parameter to exportVectorLayer 2016-05-30 10:41:44 +02:00
Denis Rouzaud
8071acd064 move PyQt compat folder to python/qgis 2016-04-29 14:10:26 +02:00
Juergen E. Fischer
2526d3e3c8 processing: switch to pyqt wrappers, flake8 fixes 2016-03-21 17:00:25 +01:00
Matthias Kuhn
e0ffd92a40 Fix typo 2016-02-23 10:24:34 +01:00
Nyall Dawson
7e90d5773f Whitespace fix 2016-01-19 08:42:02 +11:00
volaya
4c34871f0a [processing] fixed problems when opening/removing layers while alg dialog is open 2016-01-18 15:02:10 +01:00
Hugo Mercier
83a24a3794 [processing] add more possible data providers for input vector layers 2016-01-11 17:15:01 +01:00
Juergen E. Fischer
b39055b39c indentation update (now including autopep8) 2015-08-22 14:29:41 +02:00
Matthias Kuhn
9fc1b48bf3 Replace str() with unicode() and some PEP 8 2015-08-16 20:58:43 +02:00
volaya
de728743b7 [processing] do not accept grass vector layers as inputs
fixes #12436
2015-07-03 08:18:54 +02:00