6817 Commits

Author SHA1 Message Date
Alessandro Pasotti
adb930b204 Speed up getFeatures query by using a proper QgsFeatureRequest 2018-10-19 16:27:18 +02:00
Giovanni Manghi
90b57ab814 fix GRASS7 r_stats_quantile 2018-10-19 12:46:37 +01:00
Giovanni Manghi
a151debcc1 fix GRASS7 v_cluster tool 2018-10-19 08:34:42 +10:00
Alessandro Pasotti
71e2a6be7e In-place passthrough for invalid geometries if processing option is to skip invalid
Fixes #20147 - difference deletes invalid geometries
2018-10-18 17:43:00 +02:00
Nyall Dawson
ee8e1ce9bc [processing][gdal] More unit tests 2018-10-16 16:52:00 +10:00
Nyall Dawson
bef8d6e072 Update expected test results 2018-10-16 16:52:00 +10:00
Giovanni Manghi
fbb916d908 fixes the ogr2ogr based geoprocessing tools 2018-10-16 16:52:00 +10:00
Nyall Dawson
87e0f6961a [processing][gdal][needs-docs] Rename crop to cutline option for clarity
The previous name is unclear, as the option can expand as well
as crop the raster extent. We also don't refer anywhere else in this
dialog to the cutline, so that has no meaning to users
2018-10-15 18:29:28 +10:00
Alessandro Pasotti
cdf5bb630f Fix test 2018-10-05 11:03:49 +02:00
Alessandro Pasotti
29c4970f8a [processing] In-place add layer name to dlg title and store active layer 2018-10-05 10:10:20 +02:00
Alessandro Pasotti
0782b9d869 Dynamically change button text for in-place editing
The button title changes if there are selected features
2018-10-05 09:21:28 +02:00
Alessandro Pasotti
ca1c65d07a [processing] In place editing triggers editing and select all
If the active layer is not editable, the executor will
try to switch editing on.

If there are no selected features, the executor will
select all features before running.
2018-10-05 08:53:30 +02:00
Nyall Dawson
8cad2a6e16 [processing] Fix random selection count parameter
Remove a bunch of manual "max" values for numeric parameters
where the maximum just represents a 'large number' and not a real
constraint, and let the default parameter max value handling kick in instead.

In the case of random selection the max value exceeded the possible
range for integers in spin boxes and broke the widget.

Fixes #20015
2018-10-05 10:48:17 +10:00
Nyall Dawson
706b13a47b [processing] Make 'canvas extent' its own menu item in the extent
selection parameter button, instead of requiring opening the
'select layer/canvas extent' and choosing 'canvas extent'

It's only one extra click, but I don't think there's any reason
against saving this click!
2018-10-05 05:17:19 +10:00
Alessandro Pasotti
bfe2413019
Merge pull request #8101 from elpaso/bugfix-various-dbmanager-query-time-rows
[db-manager] Fix some unreported issues in the SQL dialog
2018-10-04 08:26:52 +02:00
Giovanni Manghi
e5e1b9a416 fix the GRASS7 r_contour tool removing the mandatory flag of one of the parameters 2018-10-04 05:52:13 +10:00
Alessandro Pasotti
947a199960 [db-manager] Fix max recursion limit in rollback 2018-10-03 15:17:52 +02:00
Alessandro Pasotti
c90da0e46a [db-manager] Fix affected rows -1
Number of affected rows was always reported ad -1
no matter what was in the SQL
2018-10-03 15:11:08 +02:00
Alessandro Pasotti
96b903e1f3 [db-manager] Increase precision when reporting query time
For consistency with the SQL dialog that used 3 decimal places
2018-10-03 14:48:04 +02:00
Alessandro Pasotti
b8c21b0387 [db-manager] Query elapsed time include fetch time
The values reported were always lower than
the actual time for query and fetch.

I guess that those values are useful when you
are testing queries and fine-tuning them,
so the actual value should include fetching
time.
2018-10-03 14:45:01 +02:00
Nyall Dawson
57f77d01cb [processing] Fix in-place mode results in unknown distance units
We need to still create the parameter wrappers when in in-place mode
for the input/output parameters, as some other wrappers may rely
on these for various interactions (e.g. getting the crs/fields
from the input layer)

Fixes #19990
2018-10-02 19:51:02 +10:00
Nyall Dawson
68dee5b17f [processing] Remove hack 2018-10-02 16:46:16 +10:00
Nyall Dawson
c8bf6db363 [processing] Give progress reports/allow cancelation in in-place mode 2018-10-02 16:46:16 +10:00
Nyall Dawson
5508ea036e Use a custom folder icon instead of O/S folder icon
...because using O/S folder icon can causes crashes.

Fixes #18260
2018-10-01 16:19:56 +10:00
Nyall Dawson
08cece22b0 [processing] Fix some exceptions when running in iterate mode 2018-10-01 16:13:38 +10:00
Nyall Dawson
644ea71cc9 [processing] Some History dialog UX fixes:
- fix tiny folder icon on hidpi
- remember window geometry
2018-10-01 10:50:02 +10:00
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