6791 Commits

Author SHA1 Message Date
Nyall Dawson
a0292c3ff3 [processing] Reload scripts after a script has been saved in the editor
Fixes #19934
2018-09-30 08:31:06 +10:00
Nyall Dawson
9698444f4a [processing] Fix inefficiencies in Delete Duplicate Geometries algorithm
..and make progress bar more accurate.

Use a spatial index to avoid comparing every feature to every other
feature, and only compare against features with intersecting bounding
boxes instead. Also optimise feature requests and loop logic.

Benchmarks:

Point layer, 6000k features

Before: 30 seconds
After: 0.15 seconds

Point layer, 45k features

Before: > 10 minutes
After: 7 seconds

Fixes #19973
2018-09-29 07:37:53 +10:00
Nyall Dawson
6110931f8a Rename QgsSpatialIndex::insertFeature to ::addFeature, for consistency
with other classes

And make QgsSpatialIndex a QgsFeatureSink
2018-09-29 07:37:53 +10:00
Nyall Dawson
308d7136b4 [processing] More fixes to convertToCompatibleFormat, lots of unit
tests

Fixes #19938
2018-09-28 14:25:38 +10:00
Nyall Dawson
737ab3069a [processing][gdal] Correctly handle geopackage paths with layername argument
Fixes #19938
2018-09-28 14:25:38 +10:00
Nyall Dawson
7a45702b83 [processing][gdal] Fix stylesheet for gdal algorithms 2018-09-28 14:25:38 +10:00
Nyall Dawson
7977450796 [processing][ogr] Fix conversion of non-disk based layer sources
to GDAL commands

Fixes #19946
2018-09-28 13:36:50 +10:00
Harrissou Sant-anna
b478ee750c Fix "Array of offset lines" algorithm 2018-09-28 10:19:31 +10:00
Harrissou Sant-anna
9e5cc4b76b Fix array of translated features algorithms 2018-09-28 10:19:31 +10:00
Alessandro Pasotti
c06c475b9c [db-manager] Update sql dialog buttons status
Fixes #19958 - Database manager allows one to create saved query with no name
2018-09-27 08:29:27 +02:00
Alessandro Pasotti
94ded32f4e [db-manager] Allow multiline filters in sql window
Fixes #19956 - Update SQL layer results in invalid SQL expression
2018-09-27 08:01:40 +02:00
Alessandro Pasotti
51574069a0 Fixes blocking if the edit in place functionality is used in the locator bar (with ef) on an non-modifiable layer
Fixes #19950
2018-09-26 14:19:58 +02:00
Alessandro Pasotti
6aa00b14f3
Merge pull request #8022 from elpaso/bugfix-19831-db-manager-import-srid
[dbmanager] Fixes DB Manager does not read SRID automatically
2018-09-26 08:49:32 +02:00
Nyall Dawson
6e03253143 [processing][gdal] Fix empty fid is passed if FID option is not set
Also add full range of unit tests for OgrToPostGis algorithm.

Fixes #19947
2018-09-26 08:07:09 +10:00
Nyall Dawson
844a3fb1b1 [processing] Allow help url to be set for models within help edit dialog
Refs #18767
2018-09-26 04:26:49 +10:00
Nyall Dawson
95d68e9172 [processing] Default to hiding help button for algorithms
And require that showing help is opt-in. Apart from a handful
of built-in providers, most providers will not have help pages
available within the QGIS documentation (including model and
script algorithms). Accordingly, we should hide the help button
by default and only show it for these selected providers.

Note that 3rd party algorithms can still specify custom helpUrl
urls, in which case the button WILL be shown.
2018-09-26 04:26:49 +10:00
Nyall Dawson
e2082a0935 [processing] Fix modeler help/description generation, allow setting
of model short description text

Fixes #18767
2018-09-26 04:26:49 +10:00
Nyall Dawson
aa55de8ef4 Fix advanced parameter panel incorrect margins in processing algorithm dialog 2018-09-26 04:26:27 +10:00
Nyall Dawson
6d1a9295f7 Use correct stylesheet for processing dialogs 2018-09-26 04:26:27 +10:00
Alessandro Pasotti
f7f70bfb03 [dbmanager] Fixes DB Manager does not read SRID automatically
Fixes #19831
2018-09-25 14:50:41 +02:00
Nyall Dawson
517b50c66d Capitalization 2018-09-25 22:01:39 +10:00
Alessandro Pasotti
930c3f8e45 Port makeFeaturesCompatible to C++
as: QgsVectorLayerUtils::makeFeaturesCompatible

With tests.
2018-09-25 08:17:14 +02:00
Nyall Dawson
c817e38be2 [processing] Fix an exception in modeler when editing a model in
which a child algorithm later has a new parameter added
2018-09-25 12:48:26 +10:00
Nyall Dawson
11991c5297 Fix capitalization 2018-09-25 12:41:12 +10:00
Nyall Dawson
ea2c16dd64 [processing][gdal] Dissolve field name should be optional 2018-09-25 11:14:33 +10:00
Nyall Dawson
a3af1f9f3a [processing][gdal] Add unit tests for Dissolve algorithm
Also:

Thanks to @agiudiceandrea:

Fixes #19900
Statistics were erroneously computed on the dissolve field, rather than on the statistic attribute field as it should be.

Fixes #19307
Handle filenames with white spaces (in the same way as Buffer, OffsetCurve, OneSideBuffer, PintsAlongLines algs).
2018-09-25 11:14:33 +10:00
Nyall Dawson
6e06c32a10 [processing] Fix crash when an algorithm dialog is left open and
processing options are changed

Make sure the algorithm dialogs use their own copy of algorithms,
instead of the copies owned by the processing registry. Opening
processing options triggers a full reload of providers, deleting
all existing algorithm instances from the registry first.
2018-09-25 10:32:20 +10:00
Nyall Dawson
c2dab4ff18 [processing] Use standard dock margins for results dock 2018-09-25 10:31:15 +10:00
Nyall Dawson
9fcd4fd00c Use QgsVectorLayerUtils.matchAttributesToFields in processing in-place edits 2018-09-25 08:49:21 +10:00
Nyall Dawson
93f83a0271 [processing] Remove unnecessary index creation in points in polygons
...and rely instead on the data provider's spatial index.

Refs #19919
2018-09-25 05:20:25 +10:00
Tom Kralidis
746654429c [MetaSearch] update default CSW connections 2018-09-24 10:41:38 +10:00
Nyall Dawson
961835cd8e [processing][GRASS] v.decimate zrange should be doubles, not int 2018-09-22 05:26:29 +10:00
Nyall Dawson
adfaf76168 Another Travis fix 2018-09-22 05:26:29 +10:00
Nyall Dawson
0c79d08d05 Fix tests on Travis 2018-09-22 05:26:29 +10:00
Nyall Dawson
4a0a48fe47 [processing] Also expose complete expression context inside
data defined buttons for model child algorithms

The context was not previously exposed, so users would not have
been aware that they can utilise all the variables and functions
available to parameters within child algorithms.
2018-09-22 05:26:29 +10:00
Nyall Dawson
7af13f62c0 Set widget context for widget wrappers 2018-09-22 05:26:29 +10:00
Juergen E. Fischer
e85c09254c translation string fix 2018-09-21 15:51:34 +02:00
Nyall Dawson
df657d4fd3 Fix some exceptions when running in-place edit on geometry-less layer 2018-09-21 18:15:46 +10:00
Nyall Dawson
e2068b8c1f [processing] Pass a copy of the feature to processFeature, not
the original layer's feature

Otherwise python processFeature implementations may return a
modified shallow copy of this feature, which means that the
test for modifications fails, since we're comparing against
the same feature which was modified.

Fixes some python algorithms do not modify features when used
in-place mode.
2018-09-21 18:02:21 +10:00
Alessandro Pasotti
1b2d885a03
Merge pull request #7966 from elpaso/bugfix-19843-dbmanager-quoted-sql
[dbmanager] Fix Update SQL Layer converts query to table name
2018-09-21 09:56:35 +02:00
Nyall Dawson
66f82530bd [processing] Correctly make extent selection combo box non-editable
The choice is supposed to be only from the listed options, and
shouldn't allow free-form user text
2018-09-21 13:16:13 +10:00
Nyall Dawson
f44be44ca9 [processing] Fix capitalization, ellipsis in extent parameter widget 2018-09-21 13:16:13 +10:00
Alessandro Pasotti
a8bf1b8f05 [dbmanager] Fix Update SQL Layer converts query to table name
Fixes #19843
2018-09-20 12:43:59 +02:00
Alessandro Pasotti
f208191824
Merge pull request #7946 from elpaso/bugfix-19617-processing-checkvalidity
Fix processing algorithm checkvalidity reason
2018-09-20 10:17:12 +02:00
nirvn
5ec3d5d990 [processing] improve in-place feature editing icon & toolbar position 2018-09-20 11:55:46 +07:00
Alessandro Pasotti
82a5c8f170 Move test from tests to processing folder 2018-09-19 18:29:26 +02:00
Alessandro Pasotti
826056e42c
Merge pull request #7951 from elpaso/bugfix-19802-dbmanager-saved-queries
Bugfix 19802 dbmanager saved queries
2018-09-19 11:44:18 +02:00
Alessandro Pasotti
a74b6262df [dbmanager] Fix stored queries retrieve
Fixes #19802 - DB Manager saved SQL statements are saved empty
2018-09-18 18:22:58 +02:00
Alessandro Pasotti
42573f7476
Merge pull request #7933 from nyalldawson/edit_in_place_feedback
[processing] Show a message bar success message after running in-place, parameterless alg
2018-09-18 17:14:58 +02:00
Alessandro Pasotti
001a81bc46 Fix processing algorithm checkvalidity reason
Fixex #19617 - Check validity algorithm returns empty reason in attribute table
2018-09-18 16:36:30 +02:00