1088 Commits

Author SHA1 Message Date
Alexander Bruy
c6540a6276 [processing] fix description files for SVM SAGA algs (fix #20796) 2019-01-24 09:31:18 +11:00
Alexander Bruy
34ec183354 [processing] split v.surf.rst algorithm into two (fix #19472)
This algorithm cannot output cross-validation results and topographic
parameters simultaneously, hence two tools needed. Thanks to Pedro Venâncio
for finding this and proposing a fix.
2019-01-24 06:45:23 +11:00
Alexander Bruy
dc2b29ce6a [processing] add missed "srcnodata" parameter to the buildvrt algorithm
(fix #20586).

Without this parameter it is not possible to remove collars surrounding
input raster which may overlap with other input rasters. As this is very
frequent case algorithm is useless without such parameter. To keep API
compatibility new parameter is optional and not used by default.
2019-01-22 08:17:47 +02:00
Nyall Dawson
ee34431214 Use a QHash instead of std::unordered_map
Because it turns out MUCH MUCH faster
2019-01-22 13:14:03 +11:00
Alexander Bruy
bb2c3663b0 [processing] add optional EXTRA parameter to gdalwarp algorithm (fix #20721)
This allows users to pass additional command-line arguments which are
not exposed in the algorithm definition. The most frequent use case is
enabling transparency and adding nodata values.
2019-01-22 09:39:57 +11:00
Nyall Dawson
195d98f43a [needs-docs][processing] Port SAGA raster surface volume to native QGIS alg
The SAGA version of this algorithm is of limited use in QGIS, because the
volume calculated is embedded only in the SAGA terminal output. This prevents
it being saved to a file, or reused within a model as an input to a later
model step.

It's also very user-unfriendly, because users must know to manually scan
the algorithm log to find the SAGA output.

Given that the maths here is trivial, this commit ports the algorithm across
to be a native QGIS c++ algorithm. The algorithm duplicates the SAGA alg
1:1, but outputs the volume (and area) to either a HTML report, or a vector
table. Additionally, the outputs are exported as numeric outputs from the
algorithm, allowing them to be re-used within models.

(It's also considerably faster, because it avoids the forced conversion
to SAGA raster format)

Fixes #8607 (properly, even though that report is closed)
2019-01-21 12:33:54 +11:00
Ivan Ivanov
2488f71ddb Added test for 'gdal_rasterize -init 0' 2019-01-18 09:50:08 +11:00
Nyall Dawson
f89d061ba0 [FEATURE][processing] Add geodesic mode for "Join by Lines (Hub lines)" algorithm
This allows optional creation of geodesic lines, which represent the
shortest distance between the points based on the ellipsoid.

When geodesic mode is used, it is possible to split the created lines
at the antimeridian (±180 degrees longitude), which can improve
rendering of the lines. Additionally, the distance between vertices
can be specified. A smaller distance results in a denser, more accurate
line.
2019-01-17 03:39:20 +11:00
Nyall Dawson
629de0c651 Fix some corner cases 2019-01-12 05:31:00 +10:00
Nyall Dawson
2a774d6dac [FEATURE][processing] New algorithm "Geodesic line split at antimeridian"
Ports the similar algorithm from the shape tools plugin to c++, and utilises
built in QgsDistanceArea ellipsoidal calculations to split the lines.

This algorithm splits a line into multiple geodesic segments, whenever the
line crosses the antimeridian (±180 degrees longitude)

Splitting at the antimeridian helps the visual display of the lines in some
projections. The returned geometry will always be a multi-part geometry.

Whenever line segments in the input geometry cross the antimeridian,
they will be split into two segments, with the latitude of the breakpoint
being determined using a geodesic line connecting the points either side
of this segment. The current project ellipsoid setting will be used when
calculating this breakpoint.

If the input geometry contains M or Z values, these will be linearly
interpolated for the new vertices created at the antimeridian.

Supports in-place edit mode also.
2019-01-12 05:31:00 +10:00
Nyall Dawson
efd54f862f [processing][SAGA] Resync Fill Sinks descriptions, add tests
Refs #20051
2019-01-07 09:55:46 +10:00
Nyall Dawson
45f8b863db [processing][SAGA] Resync parameters for resample tool
And add tests

Fixes #20882
2019-01-07 09:55:46 +10:00
Nyall Dawson
cef9c4eaec [FEATURE][processing] New algorithms "Extract Z values" and "Extract m values"
These algorithms allow users to convert z or m values present in feature
geometries to attributes in the layer. By default the z/m value from the
first vertex in the feature is extracted, but optionally statistics
can be calculated on ALL the z/m values from the geometry (e.g. calculating
mean/min/max/sum/etc of z values).
2019-01-04 05:01:40 +10:00
Nyall Dawson
5586352a13 [FEATURE][processing] New raster zonal stats algorithm
Like the vector zonal stats algorithm, but this one works with
the zones defined in another raster.

Iterates over the input rasters in blocks to be nice and
memory efficient.

From the algorithm help:

"This algorithm calculates statistics for a raster layer's
values, categorized by zones defined in another raster layer.

If the reference layer parameter is set to "Input layer",
then zones are determined by sampling the zone raster layer
value at the centroid of each pixel from the source raster
layer.

If the reference layer parameter is set to "Zones layer",
then the input raster layer will be sampled at the centroid
of each pixel from the zones raster layer.

If either the source raster layer or the zone raster layer
value is NODATA for a pixel, that pixel's value will be
skipped and not including in the calculated statistics."
2019-01-04 05:01:16 +10:00
Alexander Bruy
f332233f6d remove obsolete tests 2019-01-01 19:28:09 +02:00
Alexander Bruy
6809d346ab [processing] add unittest for gdal_polygonize algorithm 2019-01-01 19:26:14 +02:00
Alexander Bruy
f447745b5f [processing] add unittest for gdal2xyz algorithm 2019-01-01 18:15:41 +02:00
Alexander Bruy
a5365e26eb [processing] fix handling of the mask layer in the gdal_sieve algorithm
(fix #20713)
2019-01-01 15:20:21 +02:00
Alexander Bruy
c64383702e make advanced params optional to keep algorithm API stable 2018-12-31 12:34:12 +02:00
Alexander Bruy
3d33b9f1e2 [processing] expose resampling and format options in the gdaladdo
algorithm (fix #20432)

These options actually were here but not added to the UI.
2018-12-31 12:20:31 +02:00
Alexander Bruy
acd4ceca5c keep also old test for native interpolation algs 2018-12-30 09:48:45 +02:00
Alexander Bruy
09dbb8917d update tests 2018-12-30 06:44:09 +02:00
Peter Petrik
e71660215c [processing] add QgsProcessingParameterMeshLayer parameter 2018-12-17 11:50:53 +01:00
Nyall Dawson
c7cb5a8e3b [processing][SAGA] Fix output type of Zonal Grid Stats alg
and add unit test

Fixes #20815
2018-12-17 10:50:47 +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
b95400806a [FEATURE][processing] Native "split lines by maximum length" algorithm
This algorithm takes an input (multi)line (or curve) layer, and splits
each feature into multiple parts such that no part is longer then
the specified maximum length.

Supports data-defined maximum length property, and edit in place operation.

Credit to @NathanW2 for the inspiration!
2018-12-06 10:01:31 +10:00
Nyall Dawson
0ba37fcb72 [processing][SAGA] Add unit test for RGB composite 2018-12-05 04:47:33 +10:00
Nyall Dawson
71b32f072c [processing][SAGA] Fix output type for RGB Composite should be tif, not sdat format 2018-12-05 04:47:33 +10:00
Nyall Dawson
455e04ea66 [processing][SAGA] Fix definition of Patching algorithm
And add unit test

Fixes #20698
2018-12-04 10:36:38 +10:00
Nyall Dawson
4212deabe8 [processing][saga] Add unit test for point distances alg 2018-12-03 18:11:24 +10:00
Alessandro Pasotti
0fde410a58
Merge pull request #8564 from elpaso/rastercalculator-fast-track
Rastercalculator memory efficient track
2018-11-29 09:32:24 +01:00
Alessandro Pasotti
81723586f5 Update reference hashes for calculator processing test 2018-11-28 22:43:28 +01:00
nirvn
cdda581819 [processing] Add test & adjust handling of negative distance value
for multi ring (constant) algorithm
2018-11-28 22:47:39 +07:00
nirvn
4d5edb2380 [processing] Use MultiPolygon as output wkb type for multi ring buffer (constant) 2018-11-26 17:17:52 +07:00
Nyall Dawson
2c425c7bf0 Fix unit test 2018-11-23 20:32:16 +11:00
Luigi Pirelli
530cd5c12c
Merge pull request #8378 from havatv/patch-1
Reintroduce GDAL extract projection and update extractprojection.py to QGIS 3
2018-11-11 11:49:03 +01:00
Nyall Dawson
ba17b130f8 Move forceRHR to QgsGeometry, avoid duplicate code 2018-11-09 19:06:48 +10:00
Nyall Dawson
63c9bcb5d2 Update reference lines 2018-11-09 19:06:48 +10:00
Nyall Dawson
d1e09a2bc7 [FEATURE][processing] New algorithm to force right hand rule for polygons
This algorithm forces polygon geometries to respect the Right-Hand-Rule,
in which the area that is bounded by a polygon is to the right of the
boundary. In particular, the exterior ring is oriented in a clockwise
direction and the interior rings in a counter-clockwise direction.
2018-11-09 19:06:48 +10:00
Etienne Trimaille
6e16651d96 [FEATURE] explode hstore algorithm (#8212) 2018-11-09 13:00:29 +07:00
Håvard Tveite
669d650895
No output - no mention (gdalalg yaml) 2018-11-08 14:55:03 +01:00
H Tveite
b9355556c5 Added tests for gdal extractprojection 2018-11-06 10:23:22 +01:00
Nyall Dawson
4dd3e211e2 Unit tests for reomve duplicates by attribute 2018-11-01 21:47:28 +10:00
Nyall Dawson
f65c845f86 [processing][GRASS] Correctly handle input vector layers with |layername= param
Fixes #20277
2018-11-01 18:36:53 +10:00
Nyall Dawson
17447e4b5c [FEATURE][browser] Restore preview functionality from old 2.x standalone
browser into inbuilt browser dock panel layer properties widget
2018-11-01 15:55:57 +10:00
Nyall Dawson
41c31b44ba Fix build warning 2018-11-01 05:56:38 +10:00
Matthias Kuhn
2e1c5e6103
Skip path checking 2018-10-31 10:27:55 +01:00
Matthias Kuhn
99b246dd78
Add comment for semi-broken control file 2018-10-31 10:27:55 +01:00
Matthias Kuhn
2c4abdf70d
Fix test for merging layers to gpkg 2018-10-31 10:27:55 +01:00
Matthias Kuhn
3949cb70c4
Fix faulty alg name in test 2018-10-31 10:27:54 +01:00