4782 Commits

Author SHA1 Message Date
Nyall Dawson
d3a2f7cd65 Models can now be saved and restored 2017-06-20 19:23:21 +10:00
Nyall Dawson
9a2f14b931 First steps to model/save restore in c++
Models now save to QVariantMap, using QgsXmlUtils to save to
an xml based format (with extension .model3)
2017-06-20 17:26:57 +10:00
Nyall Dawson
179a377da0 Port more model to c++ 2017-06-20 15:31:53 +10:00
Nyall Dawson
459244126f Indentation 2017-06-20 14:45:13 +10:00
Nyall Dawson
1a4a654f8b Port more model API across to c++ 2017-06-20 14:45:13 +10:00
Nyall Dawson
f6358b2118 Begin port of modeler algorithm to c++ 2017-06-20 14:45:13 +10:00
Nyall Dawson
efe8bba006 Work on resurrecting modeler 2017-06-20 14:45:13 +10:00
Nyall Dawson
5d8f2d99ab Fix working with inputs in modeler 2017-06-20 14:45:13 +10:00
Nyall Dawson
bdc5e224a3 Small cleanups 2017-06-20 14:45:13 +10:00
Nyall Dawson
349f6eae6e Merge pull request #4732 from nyalldawson/alg
[FEATURE] Subdivide algorithm for geometries
2017-06-20 13:40:05 +10:00
PedroVenancio
b49f53bac8 Changes SAGA io_gdal RESAMPLING method to B-Spline Interpolation, as SAGA default, and add the Resampling Method parameter to SAGA Raster Calculator, as explained in https://issues.qgis.org/issues/16646 2017-06-16 20:47:18 +01:00
Nyall Dawson
4768025130 Update multiparts to singleparts to new processing API 2017-06-14 23:08:13 +10:00
Nyall Dawson
54124bd0aa Restore batch algorithm mode following new processing API 2017-06-13 12:32:30 +10:00
Nyall Dawson
be45c2fdbb Catch errors while running algs 2017-06-13 10:26:35 +10:00
Nyall Dawson
df73a0f4fc Remove outdated TODO 2017-06-13 10:26:35 +10:00
Nyall Dawson
63611b1d8f Port script code functions to c++ classes
Restore logging executed algorithms
2017-06-12 15:59:56 +10:00
Nyall Dawson
5177c7d181 Add a more descriptive tooltip for iterate mode button 2017-06-12 13:39:42 +10:00
Nyall Dawson
4b81630aa6 More responsive feedback when using iterate mode 2017-06-12 13:39:33 +10:00
Nyall Dawson
b9e0b46f9f Fix running algorithms in iterating mode 2017-06-12 13:35:31 +10:00
Nyall Dawson
15b30124c1 Hide qgis scripts for now (non-functional) 2017-06-12 10:39:57 +10:00
Nyall Dawson
d8302a26f2 Fix feature source widget returns source even when not set 2017-06-12 10:38:40 +10:00
Nyall Dawson
c52e6a72ba Fix raster layers showing as input choices for vector algs 2017-06-12 10:35:22 +10:00
Nyall Dawson
b40f409de2 Nicer formatting for log in algorithm dialog 2017-06-12 08:31:37 +10:00
Nyall Dawson
29f50b72ee [processing] Catch transform errors in when iterating features 2017-06-12 08:05:32 +10:00
Nyall Dawson
92397537fe Check validity outputs counts of valid/invalid features 2017-06-12 07:26:02 +10:00
Nyall Dawson
e49cc78674 Make html output in basic stats algorithm optional 2017-06-12 07:26:02 +10:00
Nyall Dawson
cb41ef1adc Output useful logging when running algorithms from toolbox
Now outputs the input parameters, execution time, and results
2017-06-12 07:26:02 +10:00
Nyall Dawson
1d6d4be556 Correctly reject algorithm dialog
Algorithm dialog was not being rejected when close button was
called (only hidden), leading to old dialogs and widgets
hanging around forever...
2017-06-12 07:26:02 +10:00
Nyall Dawson
aa544a14c0 Only use a temporary feedback object when running algorithms
Otherwise canceling a run causes all future runs to be canceled
2017-06-12 07:26:02 +10:00
Nyall Dawson
2d2c229332 Port checkInputCRS to c++, and allow algorithms to flag when they
require all input layers to be in the same CRS

The default behaviour is to assume that algorithms are well behaved
and can handle multi-CRS inputs, but algs have the option to
flag that they do not allow this and require the input CRS check.

Those algs should document that they require all inputs to have
matching CRS - processing 3.0 behaviour is to assume that algs
can handle this.
2017-06-12 07:26:02 +10:00
Nyall Dawson
386c4246b2 Merge algorithm reprojects layers so that all features are
in CRS of first input layer
2017-06-12 07:26:02 +10:00
Nyall Dawson
5ba0b5cd83 Port merge alg to new API 2017-06-12 07:26:02 +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
a6a3027ea6 [processing] Clip alg allows mask in different CRS to clipped layer 2017-06-12 07:26:02 +10:00
Nyall Dawson
be2ec2f1a7 Fix running processing algs through locator 2017-06-11 20:54:03 +10:00
PedroVenancio
aedb95b1aa Fixes GRASS 7 v.net.alloc #16672 2017-06-10 09:41:05 +01:00
Nyall Dawson
8c73bcbcfe [FEATURE] Port CheckValidity alg to new API
Also make outputs optional from the alg - now you can select
which outputs you need for your model!
2017-06-09 14:24:27 +10:00
Nyall Dawson
6b55300fbc If a feature sink parameter is optional and not set, don't create the sink
This adds a lot of flexibility to algorithms, as it makes output
sinks truely optional. For instance, the various "Extract by..."
algorithms could add a new optional sink for features which
'fail' the extraction criteria. This effectively allows these
algorithms to become feature 'routers', directing features onto
other parts of a model depending on whether they pass or fail
the test.

But in this situation we don't always care about these failing
features, and we don't want to force them to always be fetched
from the provider. By making the outputs truely optional,
the algorithm can tweak its logic to either fetch all features
and send them to the correct output, or only fetch
matching features from the provider in the first place (a big
speed boost).
2017-06-09 14:22:29 +10:00
Nyall Dawson
2d2dff9b4a Restore basic stats alg 2017-06-09 13:17:48 +10:00
Harrissou Sant-anna
fcc06ce380 More typo fixes 2017-06-08 09:55:25 +02:00
Harrissou Sant-anna
a148a7890d Typo fix and list ordering 2017-06-08 09:55:25 +02:00
Nyall Dawson
7d9cc131e8 Merge pull request #4657 from DelazJ/patch-1
Typo fix: Add missing spacing
2017-06-08 10:17:10 +10:00
Sandro Santilli
362d4f0697 Add DBManager test for service-only URI
Ref #16626

Also fixes runs with non-standard QGIS_PGTEST_DB env variable set
2017-06-06 14:56:40 +02:00
Nyall Dawson
de9e70e6ba Merge pull request #4684 from nyalldawson/processing_pt3
Add sourceExtent method to QgsFeatureSource
2017-06-06 21:50:45 +10:00
Alexander Bruy
80911c6e74 Merge pull request #4675 from alexbruy/processing-help
[processing] improve help system
2017-06-06 13:08:22 +03:00
Alexander Bruy
e89502f43d fix help opening 2017-06-06 11:50:28 +03:00
Nyall Dawson
448f019e1f Port polygon from layer extent alg to new API 2017-06-06 18:29:09 +10:00
Sandro Santilli
7af47c2afa Add a raster table to the test postgis setup, use it from dbmanager test 2017-06-06 09:51:30 +02:00
Sandro Santilli
3738798991 Add test for DBManager's PostGIS connector and plugin
Only enabled when ENABLE_PGTEST is set
Includes test for dbname-less URI (#10600 and #16625 and #16626)

The test relies on default libpq accessed database containing
one raster table, but makes no effort to create such database yet.
2017-06-06 09:51:30 +02:00