1298 Commits

Author SHA1 Message Date
Alessandro Pasotti
ecb6cde3aa Pick up all layer entries references from the project context
This is the processing side of the duplicate layer
names bug, while the core part was already fixed,
the processing logic was extended to handle inputs
from models and full-path references.

Fixes #20601
2019-01-02 16:59:03 +01:00
Alexander Bruy
e86ca50cc6 restore columns and rows parameters for the extremely rare case if
someone have used native interpolation algs in scripts/models
2018-12-30 08:15:26 +02:00
Alexander Bruy
5813b96159 add cell size option to IDW and TIN interpolation algorithms 2018-12-30 06:44:09 +02:00
Alexander Bruy
357cf270ff add value changed signal for custom interpolation parameter wrapper
move duplicated code into common file
2018-12-30 06:44:09 +02:00
Nyall Dawson
9e1bf68902 [processing] Fix pixel centroids along lines handling of null geometries 2018-12-18 04:38:42 +10:00
Nyall Dawson
abc7b037d8 [needs-docs][processing] Output count of retained and duplicate features from
Delete duplicate geometries algorithm.

This matches the output of the delete duplicates by attribute
algorithm
2018-12-15 10:44:33 +10:00
Nyall Dawson
82c13bdde0 [processing] Fix error when running delete duplicate geometries and
some input features have null geometries

Fixes #20788
2018-12-15 10:44:33 +10:00
Nyall Dawson
5c2f68e769 [processing] Throw error when attempting to use Distance Matrix with
multipoint datasets

There's no single approach to use for multi-point inputs, so instead
of overloading this algorithm with extra options to control how these
are handled, we raise a helpful error and push the reponsibility back
to the user to get the data into the right format before running the
tool.

Fixes #20799
2018-12-15 10:36:44 +10:00
Nyall Dawson
d79cee1fe1 [needs-docs][processing] Rename "remove duplicates by attribute" to
"delete duplicates by attribute"

for consistency with "delete duplicate geometries". Also add some
tags to delete duplicate geometries algorithm.
2018-12-05 07:36:13 +10:00
Alessandro Pasotti
1672d434ce Raster calc: refresh layers list if a layer is renamed or added/removed
Fixes #20601 - bug: Raster calculator produces empty results layer and no error message if input layer is one that has been renamed in QGIS layers panel
2018-11-29 18:30:01 +01:00
Alessandro Pasotti
18854dc7b6 Do not add duplicates in raster calc layers list
Related to #20601
2018-11-29 12:26:57 +01:00
Alessandro Pasotti
55017d7800 Fix rounding error while calculating output raster dimensions
This was creating artifacts in some situations (missing line
in the middle).
2018-11-28 14:46:21 +01:00
Matthias Kuhn
2df0cae8e3
Regenerate fids for "join attributes by location", pt2 2018-10-31 10:27:56 +01:00
Matthias Kuhn
d0eeffbecb
Regenerate fids for "points along geometry"
Fix #19998
2018-10-31 10:27:55 +01:00
Matthias Kuhn
f8d873c7cb
Regenerate fids for "join attributes by location"
Fix #19708
2018-10-31 10:27:55 +01:00
Nyall Dawson
f3e9aaf79a Fix some inefficient python dictionary iteration 2018-10-31 08:42:51 +10:00
Nyall Dawson
85efc77bb4 Fix inefficient calls to QgsFeature.attributes()[idx]
Replace with just f[idx]. Calling QgsFeature.attributes()
allocates a list of all attributes, which is inefficient
when only a single attribute value is needed.
2018-10-31 08:42:51 +10:00
fuzzysolutions
6c99cbc1ba Minor changes to speed up PointstoPaths algorithm
# 1: Replaced time-consuming call on all attributes by a more specific request - responsible for about 90% of running time in my tests.
# 2: Minor speedup by calling items() before the for loop (1s in a large layer).
2018-10-31 08:42:51 +10:00
Juergen E. Fischer
9ad01cf9ba replace three dots with ellipsises in translation strings 2018-10-27 19:06:37 +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
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
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
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
Nyall Dawson
df657d4fd3 Fix some exceptions when running in-place edit on geometry-less layer 2018-09-21 18:15:46 +10: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
nirvn
f160847ebc [processing] allow geometryless layers as input in aggregate alg. 2018-09-18 11:08:28 +07:00
nirvn
9f51a4c7d1 [processing] fix large points in polygon count overflow by using an int64 field 2018-09-17 18:54:06 +07:00
Luigi Pirelli
8b07b4ed9e
Merge pull request #7626 from rudivs/kneighbour
[feature] Adapted k-neighbour concave hull plugin as QGIS 3 algorithm
2018-09-14 15:32:46 +02:00
Rudi von Staden
8fa27e106a Fix imports for ConcaveHull 2018-09-14 13:24:57 +02:00
Martin Dobias
9bcd21fb19
Merge pull request #7194 from wonder-sk/snap-geometries-alg
[FEATURE] Snap geometries algorithm
2018-09-14 12:36:41 +02:00
Rudi von Staden
fd728c0854 Improve test coverage for k-nearest neighbor concave hull 2018-09-14 11:44:53 +02:00
Alessandro Pasotti
0626a0ff5d Disable some more algs 2018-09-14 18:23:03 +10:00
Alessandro Pasotti
08fbf38a88 Fix in-place support check for some more algs 2018-09-14 18:23:03 +10:00
Nyall Dawson
681d44f11f Messy mockup of feature 2018-09-14 18:23:03 +10:00
Rudi von Staden
858cd266c7 Use US spelling for neighbor 2018-09-14 10:05:20 +02:00
Rudi von Staden
f4cab1780a Changes from review comments
- Shorten algorithm names (KNearestNeighbour and ConcaveHull)
- Check for feedback cancellation
- remove unnecessary try/except blocks
2018-09-14 09:10:40 +02:00
Rudi von Staden
5076fb6313 Update icon to fit QGIS theme, rename and apply to ConcaveHull also
- Based colours and sizes on mAlgorithmDelaunay.svg
- Renamed from mAlgorithmKNearestConcaveHull.svg to mAlgorithmConcaveHull.svg to be more general
- Applied to ConcaveHull.py also to indicate similarity between algorithms
2018-09-14 08:35:43 +02:00
Rudi von Staden
cef34c5e51 Initialise writer after appending field 2018-09-14 00:15:13 +02:00
Rudi von Staden
6257cf64c4 Fix indentation 2018-09-13 23:26:45 +02:00
Rudi von Staden
9111b557f0 Improve k-nearest neighbour algorithm logic and add descriptive comments 2018-09-13 23:00:51 +02:00
Martin Dobias
1af35b294e Moved new snapping alg as another mode of "Snap geometries" processing alg 2018-09-13 16:24:37 +02:00
Rudi von Staden
4482c39fc8 Add tests for k-neighbour concave hull 2018-09-12 22:38:39 +02:00
Rudi von Staden
f3e2d268f6 Fix formatting 2018-09-12 21:49:53 +02:00
Nyall Dawson
c8abd40250 [processing] Fix gdal algorithm use of old wrapper API 2018-09-11 15:40:27 +10:00
Jaka Kranjc
d54bd1a203 [processing] Fix DeleteColumn output hint
the dropped fields are discarded, the modeller get the rest, as expected
2018-09-11 09:35:45 +10:00
John Kastner
0cc9501df7 Remove try-except block in voronoi.py fixes #19798
This block was swallowing all exceptions within the voronoi method.
Removing the block causes exceptions throw in the method to propagate up
the stack and eventually become visible in log files.
2018-09-08 14:38:25 +10:00
Luigi Pirelli
e611756f09 fix error because constant is not iterable 2018-09-07 20:40:35 +10:00
Luigi Pirelli
95a4c00584 fix reference to widget as instance attribute not through a method 2018-09-07 20:40:35 +10:00
Yuki
cedfaa7c16 fix hasYMax variable 2018-09-06 06:52:23 +10:00