7344 Commits

Author SHA1 Message Date
Matthias Kuhn
9c888bb30e Update tests/src/python/qgis_wrapped_server.py
Co-Authored-By: elpaso <elpaso@itopen.it>
2019-02-20 13:38:40 +10:00
Alessandro Pasotti
cf5533e06e Revert "remove 'multithreading is not supp in server text'"
This reverts commit 6c1036c5c0634a0381b17b03472ab012faefec58.
2019-02-20 13:38:40 +10:00
Nyall Dawson
979adbbabf Indicate exception types to sip
Exposes the full Python exception when an error occurs in createInstance()
2019-02-20 13:05:09 +10:00
Julien Cabieces
627230c10a fixes #18421 : Keep options AUTO_REPACK=OFF when reloading data in ogr provider 2019-02-20 11:48:11 +10:00
Mathieu Pellerin
7599d4f8d5
[expression] Add try() function to provide a way to detect and handle
expressions which can intermittently fail.
2019-02-20 06:27:43 +07:00
Nyall Dawson
c8a4dff475 Add maximum search distance parameter to QgsSpatialIndex::nearestNeighbor 2019-02-20 05:40:02 +10:00
Nyall Dawson
362ba02ade When a QgsSpatialIndex is storing feature geometry, then
nearestNeighbor search performs an EXACT nearest neighbour search,
instead of just a nearest-neighbour-by-bounding-box search
2019-02-20 05:40:02 +10:00
Nyall Dawson
26555358f9 Add API for QgsSpatialIndex to optionally store feature geometries
This potentially avoids a second expensive feature request after
building a spatial index and later needing to re-request features
which match spatial index search.

It's non-default, as it requires the index to store all feature
geometries, so it's more memory expensive.
2019-02-20 05:40:02 +10:00
Nyall Dawson
68b460277e layer_property expression function should use proper layer metadata
for return values where available

...instead of the older, server-specific properties

This affects:

- layer_property(...,'title')
- layer_property(...,'abstract')
- layer_property(...,'keywords')
- layer_property(...,'attribution')
2019-02-20 05:39:30 +10:00
Nyall Dawson
69c703141e Auto set algorithm linked to newly created QgsProcessingAlgorithmConfigurationWidget instances 2019-02-20 05:39:04 +10:00
Alessandro Pasotti
d239ea2df9 Fix unique values when generating a set of features 2019-02-19 19:04:48 +01:00
Alessandro Pasotti
03cc355f8e Catch exception from script and pipe it into feedback 2019-02-19 16:57:58 +01:00
Alessandro Pasotti
5d7a7ac973 Fix unique values on SQLite (OGR) pk 2019-02-19 14:56:10 +01:00
Alessandro Pasotti
818611cc79 Fix renamed QgsVectorLayerUtils.QgsFeatureData 2019-02-19 14:55:55 +01:00
Alessandro Pasotti
1689c9364b Fix unique values on GPKG pk
Fixes #21311
2019-02-19 14:48:10 +01:00
Julien Cabieces
21bfcfcca8 [FEATURE][needs-docs] Add possbility to define one filter for several layers 2019-02-19 11:07:49 +01:00
Alessandro Pasotti
ba3d9ed066 Cache unique values when creating features
Fixes #21305 - pasting features is very slow

Aggressively optimize createFeature for speed
and introduces createFeatures for bulk creation.
2019-02-19 10:02:17 +01:00
Alessandro Pasotti
e735d9fc75 spellcheck 2019-02-18 16:06:16 +01:00
Alessandro Pasotti
8db38afb86 Processing: fix crash in alg runner task with bad scripts
Fixes #21270

With test
2019-02-18 15:21:10 +01:00
Nyall Dawson
5ced04e400 [ogr] Read Geopackage layer identifier and description into QGIS
layer metadata automatically

Fixes #21293
2019-02-18 17:56:01 +10:00
Alessandro Pasotti
091eeb2cf4 Rule based renderer: check for scale in rulesForFeature
... when context is not nullptr, also don't crash if it is

With tests

Fixes #21287
2019-02-15 17:12:51 +01:00
Nyall Dawson
71bdc3192d Fix pasting linestring into polygon layer should auto convert to polygon
(And polygon->lines, lines->points, polygon->points, etc)

Fixes #21213
2019-02-15 16:24:56 +10:00
Hugo Mercier
9ed5b3f874
Merge pull request #9063 from mhugo/fix_19355
Fix $length in labels
2019-02-14 14:34:13 +01:00
Hugo Mercier
809196693c Fix $length in labels (fixes #19355)
Use the project expression scope to access project
parameters (ellipsoid and distance/area units)
2019-02-14 13:40:12 +01:00
Alessandro Pasotti
24c09d1673
Merge pull request #9170 from elpaso/bugfix-21254-load-style-from-db
[ogr] Show style description instead of name in other styles
2019-02-14 08:25:40 +01:00
Nyall Dawson
7418c189d0 [processing] Also generate friendly names for outputs when converting models to scripts 2019-02-14 15:36:55 +10:00
Nyall Dawson
d342ce939b [processing] When converting models to Python, use friendlier (more
descriptive) names when storing child algorithm results

Makes for much easier to understand scripts
2019-02-14 15:36:55 +10:00
Nyall Dawson
3ceea2a050 [processing] Add alg descriptions as comments when converting models to python
Makes for easier to understand scripts
2019-02-14 15:36:55 +10:00
Alessandro Pasotti
62111b9993 Fix test 2019-02-13 18:28:46 +01:00
Alessandro Pasotti
dabd649a6d
Merge pull request #9164 from elpaso/bugfix-21227-layer-rename-styles
Fix GPKG layer rename styles in browser
2019-02-13 16:24:50 +01:00
Nyall Dawson
fc8fd1e26b [processing] When converting models to python, correctly use a
multi-step feedback object to give scripts accurate progress reports

And also add in checks for cancelation between child algorithm
execution to allow generated scripts to early exit
2019-02-13 19:17:30 +10:00
Nyall Dawson
29fa7b6e7b Fix build, indentation 2019-02-13 07:59:30 +10:00
Nyall Dawson
6648a955bc Fix test 2019-02-13 07:59:30 +10:00
Nyall Dawson
69f45e389c Refactor QgsExpressionContext and move QgsExpressionContextUtils
out to its own header

Avoids slow recompilation caused by changes to the frequently
modified QgsExpressionContextUtils class
2019-02-13 07:59:30 +10:00
Nyall Dawson
d281c8aef5 Fix build 2019-02-13 07:59:30 +10:00
Nyall Dawson
e533a4078c [processing] Expose some model related variables to expressions
run inside models

Allows expressions to access important variables like the current
model path
2019-02-13 07:59:30 +10:00
Martin Dobias
6fab904cc9 Fix tests due to updated tolerance 2019-02-12 22:09:23 +01:00
Alessandro Pasotti
61d361d674 GPKG: Rename styles when layers are renamed
Partially fixes #21227

TODO:

- DB manager
- Other providers
2019-02-12 19:37:01 +01:00
Alessandro Pasotti
287a3b0ebc Renamed test db for consistency
(minor change)
2019-02-12 18:25:43 +01:00
Nyall Dawson
2e20f13279 Fix fragile test 2019-02-12 16:48:44 +10:00
Nyall Dawson
2729af65c3 [processing] Port expression widget wrapper to new API
Fixes confusing expression parameter definitions in modeler
child algorithms (there's no direction as to what the
widget should be) and ensures that the correct expression
context is revealed to the widget when in all modes.
2019-02-12 07:18:02 +10:00
Nyall Dawson
6f6d562ec8 Fix QgsFieldExpressionWidget doesn't correctly emit signals when
clearing the current expression/field
2019-02-12 07:18:02 +10:00
Nyall Dawson
d3bd1370d6 [processing] Fix incorrect parameter definition used when evaluating
parent layer parameter in the gui for dynamic properties data defined
buttons
2019-02-12 07:18:02 +10:00
Luigi Pirelli
2a917f4c10
Merge pull request #9049 from luipir/rasterSLD_export
Add SLD 1.0 export for rasters
2019-02-11 22:04:30 +01:00
Alessandro Pasotti
e6cce107ae
Merge pull request #9139 from elpaso/bugfix-21176-spatialite-text-pk
Fix spatialite text PKs
2019-02-10 10:00:15 +01:00
Nyall Dawson
78a6b4ff3d Fix build 2019-02-09 07:27:39 +10:00
Nyall Dawson
324fb40500 QgsFileWidget should also accept dropped plain text paths 2019-02-09 07:27:39 +10:00
Nyall Dawson
8ad2d7291f More unit tests 2019-02-09 07:27:39 +10:00
Nyall Dawson
2857f585ae File widget should also accept drops from browser 2019-02-09 07:27:39 +10:00
Nyall Dawson
d741c73d9b Dropping a file onto a file widget in directory mode should set the widget
to the folder containing that file, not reject the event entirely
2019-02-09 07:27:39 +10:00