53739 Commits

Author SHA1 Message Date
Nyall Dawson
774f025687 Q_FOREACH -> for 2019-01-30 02:41:07 +11:00
Nyall Dawson
919e677d56 Use switch instead of multiple if blocks for layer type logic 2019-01-30 02:41:07 +11:00
Alexander Bruy
b57c0fa9ed
Merge pull request #8998 from alexbruy/processing-tempdir
[processing] handle Processing.TEMPORARY_OUTPUT for folder parameters
2019-01-29 15:27:13 +02:00
Alessandro Pasotti
d61caab08d
Merge pull request #8990 from elpaso/bugfix-21086-wfs-field-calculator
Field calculator: provide a list of default field types
2019-01-29 12:10:15 +01:00
Alexander Bruy
d5b42aeec0 add test for temporary directory output 2019-01-29 12:58:11 +02:00
Alexander Bruy
4b2334ba69 fix typo which caused issues with temporary file outputs also fix
related tests
2019-01-29 12:58:40 +02:00
Julien Cabieces
b82ce0e522 fix crash when print from qgis processing algorithm while the python console is displayed 2019-01-29 21:34:45 +11:00
Peter Petrik
67f5022c08
fix #15984 color ramps on MacOS (#9009)
fix #15984 color ramps on MacOS
2019-01-29 08:43:34 +01:00
Nyall Dawson
3adbed503d Fix test 2019-01-29 18:15:40 +11:00
Nyall Dawson
d14869093a [processing] Correct parameter type for Map Layer parameters 2019-01-29 18:15:40 +11:00
Nyall Dawson
63b6a77702 [processing] Add API to convert a parameter definition to an equivalent
Python constructor string
2019-01-29 18:15:40 +11:00
Nyall Dawson
d4b262cdb0 Add method to convert QgsProcessing::SourceType to string representation 2019-01-29 18:15:40 +11:00
Nyall Dawson
7f7c7a9789 [processing][needs-docs] Add friendlier API for running algorithms as sub-steps
of main algorithm

Using code like:

    buffered_layer = processing.run(..., context, feedback)['OUTPUT']
    ...
    return {'OUTPUT': buffered_layer}

can cause issues if done as a sub-step of a larger processing algorithm. This
is because ownership of the generated layer is transferred to the caller
(Python) by processing.run. When the algorithm returns, Processing
attempts to move ownership of the layer from the context to the caller,
resulting in a crash.

(This is by design, because processing.run has been optimised for the
most common use case, which is one-off execution of algorithms as part
of a script, not as part of another processing algorithm. Accordingly
by design it returns layers and ownership to the caller, making things
easier for callers as they do not then have to resolve the layer reference
from the context object and handle ownership themselves)

This commit adds a new "is_child_algorithm" argument to processing.run.
For algorithms which are executed as sub-steps of a larger algorithm
is_child_algorithm should be set to True to avoid any ownership issues
with layers. E.g.

    buffered_layer = processing.run(..., context, feedback, is_child_algorithm=True)['OUTPUT']
    ...
    return {'OUTPUT': buffered_layer}
2019-01-29 18:04:16 +11:00
Alexander Bruy
fc3d5c8502 [processing] handle Processing.TEMPORARY_OUTPUT in the
parameterAsString() method which is used also for folder outputs
2019-01-29 08:27:54 +02:00
Alexander Bruy
92f6eda13b const correctness 2019-01-29 08:26:51 +02:00
Alexander Bruy
650f4d780c [wcs] exclude invalid CRSs from the coverage metadata 2019-01-29 08:26:11 +02:00
Alexander Bruy
2f7550d1a2 [wcs] improve CRS handling when parsing DescribeCoverage responce (refs #21045) 2019-01-29 08:26:10 +02:00
Denis Rouzaud
82ec1418c0
declare metatype for QgsDefaultValue (#9011)
* declare metatype for QgsDefaultValue

* sipify
2019-01-28 21:04:18 -05:00
Víctor Olaya
6eaa511eed [processing] show warning when file-based layer could not be loaded and dependent params updated
For algorithms with multiple parameters depending on a vector layer parameter, the code that loads the layer in the background is called repeatedly, impacting performance. A small layer cache is implemented with these changes, so the dialog only tries to load the layer once.
2019-01-29 11:12:23 +11:00
Alexander Bruy
8446d3bdf0 [processing][needs-docs] native vector split algorithm now outputs
GeoPackages instead of shapefiles (refs #20557)

Also remove default output extension Processing settings as they are not
used anymore.
2019-01-29 11:05:37 +11:00
Jürnjakob Dugge
1cdff21c85 [layouts] Use polyline shape instead of bounding box for selection, makes polylines selectable via single click
Fixes #20940
2019-01-29 10:59:55 +11:00
Nyall Dawson
d61f410464 Partially revert ab3adc66
The deselect action applies to ALL map layers, so it should always
be enabled, even when a vector layer isn't the current selection
2019-01-29 09:12:51 +10:00
Peter Petrik
3d0cf5cbb2 show mesh layer icon in layer tree #20722 2019-01-29 09:35:34 +11:00
Víctor Olaya
1b4a9132c2 [processing] avoid exception when listing DB schemas
do not fail if cert file cannot be deleted when creating GeoDB object

fixes #21099
2019-01-29 08:01:20 +11:00
Shahzad Lone
2c6948382d [Minor] Reserve vector - to minimize reallocation costs
Reserving vector to save on reallocation costs, where we know the size in advance.
2019-01-29 08:00:05 +11:00
Alessandro Pasotti
9faf07d0bc Always use the same subset of field types for virtual fields 2019-01-28 21:54:56 +01:00
Denis Rouzaud
3a19182fe8
add QgsField::isDateTime (#9007)
* add QgsField::isDateTime

* use QgsField::isDateTime

* rename to isDateOrTime
2019-01-28 13:53:16 -05:00
Alexander Bruy
e97649ae1f
Merge pull request #9006 from alexbruy/fix-embedded-layers
don't allow to change style of the embedded layers from the Layer Styling panel (fix #16339)
2019-01-28 20:41:40 +02:00
Alessandro Pasotti
e4be09a3da
Merge pull request #8991 from elpaso/opencl-runtime-library-check
Check for libOpenCL.so at runtime
2019-01-28 19:28:48 +01:00
Denis Rouzaud
aef0b6586c
move QgsDefaultValue to moc headers (#9000)
* move QgsDefaultValue to moc headers

because it is a Q_GADGET

* sip include
2019-01-28 09:12:10 -05:00
Alexander Bruy
e48364292d don't allow to change style of the embedded layers from the Layer
Styling panel (fix #16339)
2019-01-28 15:51:49 +02:00
Blottiere Paul
aecdb4278d
Merge pull request #8903 from pblottiere/gfi_geojson
JSON format for WMS GetFeatureInfo request [server]
2019-01-28 14:04:03 +01:00
Blottiere Paul
8305bda5ef Fix unit test 2019-01-28 11:42:14 +00:00
Blottiere Paul
daa40387eb Fix url query 2019-01-28 11:42:14 +00:00
Blottiere Paul
ca397b2928 Case insensitive 2019-01-28 11:42:14 +00:00
Blottiere Paul
19a77fff80 Update expected file 2019-01-28 11:42:14 +00:00
Blottiere Paul
81a8bc01ec Small fix 2019-01-28 11:42:14 +00:00
Blottiere Paul
3c8d5ebda5 Update GetCapabilities tests with new json format 2019-01-28 11:42:14 +00:00
Blottiere Paul
c55cbd2cda Add json format in gGetCapabilities document 2019-01-28 11:42:14 +00:00
Blottiere Paul
63645be5bd Remove left over 2019-01-28 11:42:14 +00:00
Blottiere Paul
4acc7136f0 Update test 2019-01-28 11:42:14 +00:00
Blottiere Paul
130be380ec Use CRS in json geometry 2019-01-28 11:42:14 +00:00
Blottiere Paul
aa55beba8e Update tests 2019-01-28 11:42:14 +00:00
Blottiere Paul
7dbc96b614 Update sip 2019-01-28 11:42:14 +00:00
Blottiere Paul
724813a52e GeoServer compatibility 2019-01-28 11:42:14 +00:00
Blottiere Paul
df75801847 Insensitive string comparison 2019-01-28 11:42:14 +00:00
Blottiere Paul
70189194a9 Fix unit test 2019-01-28 11:42:14 +00:00
Blottiere Paul
1b6ed5f45e Update expected files for unit tests 2019-01-28 11:42:14 +00:00
Blottiere Paul
7f19cb81e6 Update sip 2019-01-28 11:42:14 +00:00
Blottiere Paul
eee940dc8f Export aliases is an option 2019-01-28 11:42:14 +00:00