39892 Commits

Author SHA1 Message Date
rldhont
59d1f6d1b2 [Server] Tests update mask image 2017-07-07 13:00:11 +02:00
Martin Dobias
a8cceff0fc Make it possible to build just core lib and providers: -DWITH_GUI=FALSE
This is useful in some cases when working on a third party app/script
that only uses qgis_core. For example, I am working on qgis 3D project
and it is useful to be able to build QGIS core lib with custom Qt version
without having to spend too much time building what I do not need.
Also may be useful for QField to simplify the build of QGIS as a dependency
(no QScintilla, Qwt) and avoid bits of code in providers that would not
be used anyway.

No real source code changes, just configuration changes, mainly in providers.
2017-07-07 11:38:03 +02:00
Nyall Dawson
eb8f91a556 Fix some button sizes on hidpi displays 2017-07-07 18:17:40 +10:00
Nyall Dawson
e0915103fd Fix folder destinations always default to temp folder (fix #16800) 2017-07-07 17:02:19 +10:00
Nyall Dawson
0802586a13 Fix minimum height of font buttons on non-Windows platforms 2017-07-07 16:50:27 +10:00
Nyall Dawson
b500080a31 [processing] Use correct file filter for file output dialog 2017-07-07 16:39:19 +10:00
Francisco Raga
617e4577a6 Fix link to create a pull request and to git download (#4817)
* fixing link to create a pull request

* fixing link in git exe

Git for Windows 1.x is deprecated, superseded by Git for Windows 2.x.
2017-07-07 08:25:28 +02:00
Matthias Kuhn
632eca6079 Merge pull request #4795 from pblottiere/dynamicform
[FEATURE] Dynamic form for joined fields
2017-07-07 08:22:18 +02:00
Nyall Dawson
0036f27216 Merge pull request #4794 from nyalldawson/tests2
Use native algorithms for processing tests where possible
2017-07-07 14:45:00 +10:00
Nyall Dawson
3a31f54b15 Don't use broken qHash< QList<...> > on Qt < 5.6
Results in infinite recursion
2017-07-07 13:50:52 +10:00
Matthias Kuhn
e8177b733f Print debug info when ctest2travis indexes run out of sync 2017-07-07 13:50:51 +10:00
Nyall Dawson
05e8928e30 Use native algorithms for processing tests where possible
And fix a few issues in the dissolve algorithm
2017-07-07 13:49:43 +10:00
Nyall Dawson
cb6c6f39a2 Merge pull request #4812 from nyalldawson/model_exp_input
[processing] Allow model child parameters to take values from an expression
2017-07-07 12:40:25 +10:00
Nyall Dawson
515ba24230 Update tests 2017-07-07 11:58:15 +10:00
Nyall Dawson
d6cbf30cc4 Add all 'single value' input/output types as expression variables
Since expressions can be written which convert string values
to numeric, and vice versa, it doesn't make sense to restrict
creation of expression variables to only numeric inputs/outputs.
Instead create variables for all sensible inputs/outputs, since
users may want to use these in expressions which convert the
output to a number....
2017-07-07 11:36:42 +10:00
Nyall Dawson
ac51ae106c Add unit tests 2017-07-07 11:36:41 +10:00
Nyall Dawson
3ea70696f0 Add descriptions for model algorithm variables 2017-07-07 11:35:31 +10:00
Nyall Dawson
35e16b2f31 Add method for specifying variable description when adding to contexts
And use this description in expression builders when it's set.
2017-07-07 11:35:31 +10:00
Nyall Dawson
534844f999 Add function to return variables available for child algorithms during
model execution

And use this function to determine in advance dependencies between
child algorithm parameters with expression based values and
which other child algorithms they depend upon.
2017-07-07 11:35:31 +10:00
Nyall Dawson
3f9cfe0ce7 Fix setting number parameters to expressions 2017-07-07 11:35:31 +10:00
Nyall Dawson
82ef7d2a89 Create specific expression context scope for child algorithms
Contains variables for model parameters, algorithm results for
other child algorithms which are not dependent on the
algorithm.

Allows removal of final pieces of ModelerAlgorithm code
2017-07-07 11:35:31 +10:00
Nyall Dawson
d8086e549d Use c++ method for available sources 2017-07-07 11:35:31 +10:00
Nyall Dawson
17199c8ffd Reimplement getAvailableValuesOfType in QgsProcessingModelAlgorithm 2017-07-07 11:35:31 +10:00
Nyall Dawson
26cd6017b8 Use an expression context when evaluating child parameters with expression sources 2017-07-07 11:35:31 +10:00
Nyall Dawson
3243a1a34c Allow model child parameters to take values from an expression
The expression is evaluated just before the child algorithm is
executed, so can utilise results already calculated by other
children in the model through the use of expression context
functions
2017-07-07 11:34:17 +10:00
Nyall Dawson
52f4c5e975 Merge pull request #4799 from nyalldawson/m2
Run processing algorithms using task manager
2017-07-07 11:31:22 +10:00
Nyall Dawson
240dd19f97 Update tests 2017-07-07 11:15:05 +10:00
Nyall Dawson
2c91df4c12 Expand on docs 2017-07-07 10:14:51 +10:00
Nyall Dawson
da02c9a7ba Fix deadlock when running algs in task manager and python exception occurs 2017-07-07 09:28:20 +10:00
Nyall Dawson
1ab9c992b5 Fix possible error when messagebar items are popped and events are queued 2017-07-07 09:28:20 +10:00
Nyall Dawson
ac9a39f09a Fix processing.runAndLoadResults 2017-07-07 09:28:20 +10:00
Nyall Dawson
55ce31b371 When calling procesing.run(), map layer results are automatically
converted to QgsMapLayer objects with the ownership transferred
to the Python caller

This should make it super-easy for PyQGIS scripts to run processing
algorithms and immediately utilise the results, even if they
are memory layers. They call processing.run(), and get a dict of
results back which includes those layers ready for adding to the
current project or doing some other processing or operations
with, and if they don't transfer to ownership off then these
layers will be correctly garbaged collected by Python.
2017-07-07 09:28:20 +10:00
Nyall Dawson
a2af3a9345 Make concave hull alg more efficient
- remove temporary layers from context, delete them as soon as they
are finished with
- directly remove features via data provider, instead of selecting
and using edit buffer
- use native geometry methods for splitting to single features
and removing rings
2017-07-07 09:28:20 +10:00
Nyall Dawson
70cc19687d Add a method to take result layers (and ownership) from processing context 2017-07-07 09:28:20 +10:00
Nyall Dawson
db816ec3fe Port a multi-step algorithm to new API (concave hull) 2017-07-07 09:28:20 +10:00
Nyall Dawson
a15d283cd6 Port delaunay triangulation alg to new API 2017-07-07 09:28:19 +10:00
Nyall Dawson
75cd91b1a0 Port voronoi polygons algorithm to new API 2017-07-07 09:28:19 +10:00
Nyall Dawson
ebd346c407 runPrepared rethrows exceptions 2017-07-07 09:28:19 +10:00
Nyall Dawson
90f10ae853 Port snap geometries algorithm to new API 2017-07-07 09:28:19 +10:00
Nyall Dawson
05364aa5f0 When running algorithm tests, if two parameters share the same
layer source, ensure that the actual parameter values point
to the same layer
2017-07-07 09:28:19 +10:00
Nyall Dawson
d9fca48217 Add missing signal 2017-07-07 09:28:19 +10:00
Nyall Dawson
ab06973d6a Don't try to load default styles in processing test layers 2017-07-07 09:28:19 +10:00
Nyall Dawson
3cbcd75d2f Add equality operator for QgsProcessingFeatureSourceDefinition 2017-07-07 09:28:19 +10:00
Nyall Dawson
3601138d2a Use a feature source instead of vector layer for QgsGeometrySnapper 2017-07-07 09:28:19 +10:00
Nyall Dawson
8a84e134cc Algorithms don't have to be split to prepare/process/postProcess
Since it's safe to evaluate parameters in background threads
now, it's usually going to be ok to evaluate everything in
the processAlgorithm step.

This keeps the algorithm code as simple as possible, and will
make porting faster.

Note that the prepare/postProcess virtual methods still exist
and can be used when an algorithm MUST do setup/cleanup work
in the main thread.
2017-07-07 09:28:19 +10:00
Nyall Dawson
f39b7a0c4c Fix build warning 2017-07-07 09:28:19 +10:00
Nyall Dawson
3108d68f87 Indentation 2017-07-07 09:28:19 +10:00
Nyall Dawson
4fa2bc025c Keep correct order for zonal stats options, set some stats by default 2017-07-07 09:28:19 +10:00
Nyall Dawson
4eca20f28d Fix zonal stats algorithm execution 2017-07-07 09:28:19 +10:00
Nyall Dawson
274d684f64 Fix procesing test layer loading 2017-07-07 09:28:19 +10:00