5090 Commits

Author SHA1 Message Date
volaya
40134d6473 [processing] fixed SAGA command writing and test 2019-02-21 10:05:46 +01:00
volaya
aa02e9f3ed added missing import 2019-01-31 08:33:29 +01:00
volaya
585d42b347 [processing] fixed missing import and encoding 2019-01-30 09:09:26 +01:00
volaya
e14ad01cd1 indentation fixes 2019-01-29 09:42:24 +01:00
volaya
2895493cce [processing] encoding and indentation fixes 2019-01-28 09:34:15 +01:00
volaya
8bbd55943a [processing] added test for SAGA output to non-ascii files 2019-01-25 11:10:30 +01:00
volaya
d627b561be [processing]remove trailing spaces 2019-01-25 11:09:49 +01:00
volaya
261430b961 [processing] added test for SAGA non-ascii inputs 2019-01-25 10:30:08 +01:00
volaya
5690b05e6e [processing] added back code to replace filenames when exporting raster layers in SAGA 2019-01-25 09:52:55 +01:00
volaya
76d9ab8283 [processing] fixed SAGA for non-ascii output files
Fixes #19351
2019-01-25 09:39:45 +01:00
volaya
fda41e3b02 [processing] fixed handling of input filenames with non-ascii characters
Looks like there is no problem now in SAGA when using filenames with non-ascii chars, so some code used for replacing filenames has been removed. Also some code for python2, which is not needed now.

fixes #18617
2019-01-24 13:18:31 +01:00
volaya
e3516ab1b4 [processing] fixed qgis algorithms help file
fixes #20966
2019-01-23 08:38:41 +01:00
Nyall Dawson
db3b9aeb6b Revert "[processing] hide 'select file' button for vector layers when there are dependent params"
This reverts commit f2044528951bbb09a70b9c696d79d8cd5b756214.

It's a contentious fix, which needs discussion
2019-01-23 17:30:47 +10:00
volaya
eb47288fac [processing] correctly set output styles for models
fixes #20573
2019-01-23 08:02:19 +01:00
volaya
f204452895 [processing] hide 'select file' button for vector layers when there are dependent params
fixes #21055
2019-01-23 08:02:18 +01:00
Alexander Bruy
0c4c8feb70
Merge pull request #8945 from alexbruy/processing-fieldcalc
[processing] use active layer by default in field calculator algorithm (fix #19686)
2019-01-22 15:25:20 +02:00
Alexander Bruy
3a98174640
Merge pull request #8942 from alexbruy/processing-interpolation
[processing] use complex delimiter for interpolation data (fix #20490)
2019-01-22 14:03:57 +02:00
Alexander Bruy
95209d134c [processing] use active layer by default in field calculator algorithm
(fix #19686)
2019-01-22 11:04:49 +02:00
Alexander Bruy
17fd86e723 [processing] use complex delimiter for interpolation data to avoid
overlaps with charactes which can be used in the layers source URI (fix #20490)
2019-01-22 10:15:07 +02:00
Alexander Bruy
133b4057a6 add note about format of the srcnodata parameter 2019-01-22 08:18:37 +02: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
Matthias Kuhn
9452667af3
Add native densify by interval algorithm 2019-01-21 09:49:38 +01:00
Matthias Kuhn
8db14d8fc2
Merge pull request #8906 from m-kuhn/native_polygons_to_lines
Add native polygonstolines algorithm
2019-01-21 09:11:01 +01: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
Markus Neteler
8db3dead87
Complete grass76 support 2019-01-19 22:08:28 +01:00
Matthias Kuhn
4c8af20b51
Add native polygonstolines algorithm 2019-01-18 19:07:08 +01:00
Ivan Ivanov
2488f71ddb Added test for 'gdal_rasterize -init 0' 2019-01-18 09:50:08 +11:00
Ivan Ivanov
36c821da34 Allow gdal_rasterize to accept -init with value of 0; changed default value to not introduce a breaking change 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
Mathieu Pellerin
6957009f8b [themes] Fix the processing modeler's rendering on dark backgrounds 2019-01-15 12:24:50 +07: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
Juergen E. Fischer
b6293f23c8 osgeo4w: run python scripts with python3 (fixes #20870) 2019-01-07 15:41:11 +01:00
Luigi Pirelli
83c6a2c49b
Merge pull request #8444 from NaturalGIS/reenable_grass_r_mapcalculator
add GRASS r.mapcalculator, remove r.mapcalc
2019-01-07 13:38:49 +01:00
Giovanni Manghi
a57fec8714 fix module description file 2019-01-07 10:43:50 +00:00
Giovanni Manghi
10d479929c fix the module name 2019-01-07 10:14:40 +00:00
Giovanni Manghi
9f3c313830 add missed file 2019-01-07 09:56:59 +00:00
Giovanni Manghi
667a86b075 change the name of the module to match the new name in GRASS 7.4.4 2019-01-07 09:54:27 +00: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
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
2f1efd8927
Merge pull request #8776 from alexbruy/gdal_tests
[processing] cover more GDAL algorithms with unittests
2019-01-02 08:17:19 +02:00
Juergen E. Fischer
196024ccba typo fixes 2019-01-01 21:53:37 +01: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