773 Commits

Author SHA1 Message Date
Nyall Dawson
2850b308ba Add unit test for wedge buffers alg 2018-04-24 10:07:51 +12:00
Nyall Dawson
d87f75aa98 [processing] Unit tests for distance param widget wrapper 2018-04-20 22:44:28 +10:00
Nyall Dawson
0dfb3c2d8c [processing] Use distance parameter for more algorithms 2018-04-20 18:27:00 +10:00
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
Nyall Dawson
6c892652ac Followup a463858, fix failing tests 2018-04-20 08:38:15 +10:00
Martin Dobias
721c536185
Merge branch 'master' into overlay-alg-fixes-1 2018-04-18 14:16:50 +02:00
Nyall Dawson
0e0e133c7d [FEATURE][processing] Add sort order option to Add Incremental Field alg
This allows users to optionally set a sort order to use when
assigning values in the Add Incremental Field algorithm.

Previously values were always added using the original feature
order. With this change users can control the order in which
features are assigned values.
2018-04-18 20:50:37 +10:00
Martin Dobias
4f829fde62 Port Intersection algorithm to C++, cleanups and tests
Finally starting a suite of unit tests for overlay algorithms:
- overlay1 - layers that cover various basic overlay situations
- overlay2 - layers where one input has self-intersecting polygons
- overlay3 - layers where intersections return different geometry types
2018-04-17 19:12:58 +02:00
Matthias Kuhn
29b080fce3
Merge pull request #6754 from m-kuhn/processing_filter_algorithm
[FEATURE] Feature filter algorithm for processing models
2018-04-11 08:29:12 +02:00
Nyall Dawson
f66993edbb More hash updates 2018-04-10 09:57:58 +10:00
Nyall Dawson
fc133ef578 Update tests for travis 2018-04-10 09:57:58 +10:00
Nyall Dawson
7544cdb2ee [processing][grass] Disable some failing tests 2018-04-10 09:57:58 +10:00
Nyall Dawson
e83cd6155f [processing] Better debugging for failed tests 2018-04-10 09:57:58 +10:00
Nyall Dawson
ee185cce4d [processing] Fix python runAlgorithm when algorithm has missing optional outputs 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
41a27f700f Attempt SAGA tests on Travis 2018-04-10 09:57:58 +10:00
Nyall Dawson
ea24847adf [processing] Try to resurrect grass tests 2018-04-10 09:57:58 +10:00
Matthias Kuhn
641cbe3765 fixup testdata 2018-04-09 13:10:48 +02:00
Matthias Kuhn
af18f46c85 Add filter feature processing test 2018-04-09 13:10:48 +02:00
Matthias Kuhn
ef676cffc8 Make models available in processing tests 2018-04-09 13:10:48 +02: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
b28e580a79 Indentation 2018-04-09 10:58:41 +10:00
Nyall Dawson
8b04188230 Don't use hardcoded paths in test 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
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
8aa9a82d28 [FEATURE][processing] Add algorithm to swap x/y coordinate values
This algorithm swaps the X and Y coordinate values in input
geometries. It can be used to repair geometries which have
accidentally had their latitude and longitude values reversed.
2018-04-05 06:35:13 +10:00
Nyall Dawson
732c5260cc [processing] Fix Concave Hull algorithm, add tests
Fixes #18475
2018-03-19 12:00:30 +11:00
Nyall Dawson
7a28181e7f Skip some attributes in import photos test
These absolute paths cannot be tested in processing algorithm tests
2018-03-16 15:08:29 +11:00
Nyall Dawson
fa2c5aebb7 [FEATURE][processing] Import geotagged photos algorithm
This implements a new "import geotagged photos" algorithm
for processing. It allows selection of a folder which it
will scan for jpg files which have been geotagged and
creates a PointZ layer with the result, with attributes
for photo path, altitude, direction and timestamp.

Optionally the scan can be recursive and you can create
an optional table of photos which could not be read
or which were missing geotags.

The algorithm automatically sets the output table to
use an external resource widget to display the linked
photos in the attribute form.

[ALGCHANGE]
2018-03-16 15:08:29 +11: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
Nyall Dawson
5710709c72 Add extra hash to processing hillshade test
At this stage the raster processing tests just test that the
algorithm executes, and generates an output file - there's
no way to validate that the provided hashes are valid
outputs or not
2018-03-08 09:40:07 +10:00
Nyall Dawson
05484dceb6 [FEATURE][processing] Rotate features algorithm
Allows rotation of features by a set angle.

The rotation can occur around a preset point or the individual
feature's centroids.
2018-03-06 19:21:00 +11:00
Alexander Bruy
44895084d9
Merge pull request #6525 from nyalldawson/segmentize
[FEATURE][processing] Add "segmentize" algorithms
2018-03-06 08:27:52 +02:00
Webmaster
8a063df726 fix travis 2018-03-06 10:44:08 +07:00
nirvn
0d92f96f42 [FEATURE][processing] allow to create points on all parts in centroids alg 2018-03-06 10:44:08 +07:00
nirvn
0630b1c736 [FEATURE][processing] allow to create points on all parts in point on surface alg 2018-03-06 10:44:08 +07:00
Nyall Dawson
4232b93539 [FEATURE][processing] Add "segmentize" algorithms
Adds two new algorithms which expose QgsGeometry's methods
for segmentizing curved geometries.

"Segmentize by maximum distance":
The segmentization is performed by specifying the maximum
allowed offset distance between the original curve and the
segmentized representation.

"Segmentize by maximum angle":
The segmentization is performed by specifying the maximum
allowed radius angle between vertices on the straightened
geometry (e.g the angle of the arc created from the
original arc center to consective output vertices on the
linearized geometry).
2018-03-04 21:28:42 +10:00
Nyall Dawson
871132eae6 [processing] Port point on surface to c++ 2018-03-04 08:52:34 +11:00
Webmaster
2073562fa5 harmonize join type value (0=one-to-many, 1=one-to-one) 2018-03-02 21:01:12 +07:00
nirvn
1542b484be [FEATURE][processing] add discard non matching option to join attribute table alg 2018-03-02 21:01:12 +07:00
Alexander Bruy
df61548c82 [processing] rename algorithm to "Multi-ring buffer (constant distance)" 2018-03-02 10:00:16 +02:00
Alexander Bruy
5daa8fdb67 [processing] add test for multiring buffer algorithm 2018-03-02 10:00:16 +02:00
Mathieu Pellerin
6f47b25037
[FEATURE][processing] one-to-many join support to the join attribute table alg. (#6499) 2018-03-02 11:58:16 +07:00
Nyall Dawson
cc10bbd950 [processing] Allow empty expressions in refactor fields alg
Fixes #15640
2018-02-26 10:20:19 +11:00