2444 Commits

Author SHA1 Message Date
Nyall Dawson
6a2625664e [processing] Add dedicated "distance" parameter
This is a subclass of QgsProcessingParameterNumber, but specifically
for numeric parameters which represent distances. It is linked
to a parent parameter, from which the distance unit will
be determined, and is shown using a dedicated distance widget
within the processing parameters panel. This widget shows
the distance unit.

This avoids the confusion when running algorithms which
use distances where the unit depends on a layer or CRS parameter -
e.g. the distance parameter in the buffer algorithm gives
the distance in layer units... so now we can show those units
directly within the dialog. Hopefully this leads to less
user confusion and accidental "1000 degree buffers"!

Additionally - if the unit is in degrees, a small warning
icon is shown next to the parameter. The tooltip for this
icon advises users to reproject data into a suitable
projected local coordinate system.

Initially implemented for the native buffer and single
sided buffer algorithm only - but more will be added.

Fixes #16290
2018-04-20 18:27:00 +10:00
nirvn
7d787980f5 followup a463858: fix interpol. data widget setValue function 2018-04-20 10:13:35 +07:00
Nyall Dawson
6c892652ac Followup a463858, fix failing tests 2018-04-20 08:38:15 +10:00
nirvn
a463858bf3 [processing] restore TIN / IDW interpolation algorithms 2018-04-19 17:19:07 +07:00
nirvn
7d43e7b876 fix interpolation data widget 2018-04-19 17:19:07 +07:00
Martin Dobias
45b264db08 Fixes after review 2018-04-18 13:04:05 +02:00
Nyall Dawson
405d8f29d4 [processing] Skip more unnecessary geometry checks 2018-04-10 12:27:46 +10:00
Nyall Dawson
0a1a6769d2 Fix build with Qt 5.5 2018-04-10 10:15:19 +10:00
Nyall Dawson
20bbef3800 [processing][grass] Fix broken r.lake algorithm 2018-04-10 09:57:58 +10:00
Nyall Dawson
cba395e8c4 [processing][grass] Fix broken r.his algorithm 2018-04-10 09:57:58 +10:00
Nyall Dawson
89a3dd5e15 [processing][grass] Fix broken r.cost algorithm 2018-04-10 09:57:58 +10:00
Nyall Dawson
f03baa871a [processing][grass] Don't try to create skipped optional outputs 2018-04-10 09:57:58 +10:00
Nyall Dawson
60efbb539e [processing][grass] Fix broken r.li.renyi.ascii alg 2018-04-10 09:57:58 +10:00
Nyall Dawson
1fc5a0e597 [processing][grass] Fix broken r.statistics alg 2018-04-10 09:57:58 +10:00
Nyall Dawson
7fa9d4120a [processing] Fix Distance Matrix alg considers distances to
same points

Add more unit tests

Fixes #17350
2018-04-09 12:48:50 +10:00
Nyall Dawson
3dec1755b6 [processing][grass] Allow operation on only selected vector features
Fixes #18218
2018-04-09 10:58:41 +10:00
Nyall Dawson
92634a9d92 [processing][grass] Allow use of feature sources as vector inputs 2018-04-09 10:58:41 +10:00
Nyall Dawson
aca75cfa6e [processing][grass] Fix use of v.external with ogr layers which
do not support random read

These layers are not compatible with v.external, so we have to
use v.in.ogr for them
2018-04-09 10:58:41 +10:00
Nyall Dawson
8ba762a630 [processing][grass] Fix grass vector algs don't work with memory layers
Fixes broken grass algs inside models (fixes #18662)
2018-04-09 10:58:41 +10:00
Nyall Dawson
f928e3dde9 [processing][grass] Add some missing imports 2018-04-09 10:58:41 +10:00
Nyall Dawson
c50a039745 [processing][grass] Push feedback object to algorithm methods 2018-04-09 10:58:41 +10:00
Nyall Dawson
ccccad54c0 [processing] Fix exception in processing.run when feedback
object is not specified
2018-04-09 09:18:04 +10:00
Nyall Dawson
4c8b1595a9 [processing] Fix GDAL algorithms do not run with memory layer inputs
Breaks execution of mixed QGIS/GDAL algorithms
2018-04-07 15:36:21 +10:00
Nyall Dawson
1942854166 [processing] Port Explode Lines to c++
Aside from the performance benefits, the Python version of this
algorithm occasionally fails on Travis with odd errors. Hopefully
by porting to c++ it will fix these, or at least give useful
debug information in the event of a fail.

Also add support for curved input geometries.
2018-04-06 15:34:52 +10:00
Nyall Dawson
ccb72ebce2 [processing] Fixes for Service Area algorithms
- Output interpolated points when travel cost falls mid-way along
an edge
- Output all intermediate reachable points also
- Make outputting upper/lower bound points optional, and non-default.
Now by default we just output all definitely reachable points and
the interpolated points along edges which correspond to the travel cost.
This allows the output to be used to correctly generate service areas
e.g. by concave/convex polygons and all reachable nodes will be
included in the area.
- Allow algorithm to optionally output a line layer (and make the
point layer optional too, and default to just the line layer output)
containing all reachable line segments (including interpolated
segments of lines when the travel cost sits midway along that
edge). This output is more easily understandably for users.
2018-04-06 12:43:52 +10:00
Nyall Dawson
78a6118ba4 [processing] Fix broken Densify by Interval algorithm, add test
Fix #18640
2018-04-06 11:50:23 +10:00
Nyall Dawson
e3bbc35bed [processing] Fix incorrect error string in field mapper algorithm 2018-04-04 05:27:32 +10:00
Nyall Dawson
d164f8ff98 [processing] Disable cancel button for GDAL algorithms
The provider doesn't support cancelation
2018-04-03 13:40:48 +10:00
Nyall Dawson
8e08bda46c [processing][grass] Fix incorrect path calculation for grass binary 2018-03-27 07:10:37 +11:00
Nyall Dawson
bec878f6f9 [processing][grass] Fix error after running grass algorithms 2018-03-27 07:10:37 +11:00
Nyall Dawson
49d585ef17 [processing][gdal] Move method to write input files to text file to GdalUtils 2018-03-22 06:46:39 +11:00
Nyall Dawson
b17feaaa97 [processing][gdal] Expose no data options for gdal merge algorithm 2018-03-22 06:46:39 +11:00
Nyall Dawson
1d8ecaf79a [processing][gdal] Use a text file for input file list to gdal_merge
Otherwise command fails when attempting to merge many rasters due
to length of command line. Now the algorithm uses the same approach
as buildvrt and creates a text file containing the names of the
rasters and then passes this to the gdal_merge command

Fixes gdal merge algorithm fails with many input files
2018-03-22 06:46:39 +11:00
Nyall Dawson
00bb177f3d [processing][gdal] Fix parsing of creation options
Creation options must be specified one at a time - the
current approach causes them to be specified once embedded
in quotation marks, which is not valid input for gdal
2018-03-21 18:36:28 +11:00
Nyall Dawson
044470d38f [processing][gdal] Skip expensive parameter validation when just showing command in dialog 2018-03-21 15:30:18 +10:00
Nyall Dawson
5436ce9a35 [processing] Avoid grass 'duplicate parameter' warning 2018-03-21 09:14:23 +11:00
Nyall Dawson
ff6ea33686 [processing] Fix broken Aggregate algorithm
Fixes #18349
2018-03-20 08:06:38 +11:00
Nyall Dawson
732c5260cc [processing] Fix Concave Hull algorithm, add tests
Fixes #18475
2018-03-19 12:00:30 +11:00
Nyall Dawson
87e8432644 [processing] Fix Points to Paths terminates when an order by
field is empty
2018-03-16 14:30:30 +11:00
Nyall Dawson
654a4a4af6 [processing] Fix algorithm progress bar resets to 0 when an algorithm
reports a non-fatal error

Fixes the "flashy" progress bar when an algorithm encounters a lot
of errors.
2018-03-15 13:43:01 +11:00
Alexander Bruy
88e8acddf8
Merge pull request #6571 from slarosa/fix_18183
[processing] SAGA "output extent" should not be mandatory (fix #18183)
2018-03-13 08:45:45 +02:00
Nyall Dawson
251e1d5352 [FEATURE][processing] Add line sinuosity to "Export Geometry Info"
Adds line sinuosity and straight distance to the stats calculated
by "Export Geometry Info"

Fixes #12376
2018-03-12 14:58:04 +11:00
Ari Jolma
08332e73a2 [processing][gdal] color relief alg: add the default color option, i.e., no switches 2018-03-12 10:43:47 +11:00
Nyall Dawson
8df954d6b8 [processing] Port Delete Holes algorithm to c++, allow dynamic
min area parameter
2018-03-12 10:41:22 +11:00
Salvatore Larosa
23172a101e [processing] Fixes #18183: SAGA "output extent" should not be mandatory 2018-03-10 22:08:07 +01:00
Matthias Kuhn
cdef548cb8 Fix Fields Mapping parameter id 2018-03-07 09:00:33 +11:00
Matthias Kuhn
a337d2050b Make use of new processing parameter infrastructure 2018-03-07 09:00:33 +11:00
Nyall Dawson
871132eae6 [processing] Port point on surface to c++ 2018-03-04 08:52:34 +11:00
nirvn
55764689ed fix one-to-one, one-to-many wording 2018-03-02 21:01:12 +07:00
Alexander Bruy
22fea14a17 [processing] remove explicit outputs definitions 2018-03-02 10:35:56 +02:00