5964 Commits

Author SHA1 Message Date
Alexander Bruy
1a76a0963e add Select By Location to the Selection toolbar (fix #20350) 2020-08-16 12:15:22 +03:00
Alexander Bruy
bacf779236 pick Vector menu title from the main QGIS window instead of using own
translation (fix #35028, #28474)
2020-08-16 12:15:22 +03:00
nirvn
8fe4d3e793 [processing] Allow merging layers with mixed attribute type 2020-08-11 15:03:38 +07:00
vcloarec
a4c8f33e09 fix processing test and remove invisible char 2020-08-10 08:28:24 +10:00
Matthias Kuhn
2b3b88c515
Merge pull request #37595 from gacarrillor/pr_processing_results_group
Load processing results to layer group (optional)
2020-08-08 09:09:00 +02:00
Sylvain POULAIN
78cea71e00 Missing options for r.neighbors in processing
All options added : https://grass.osgeo.org/grass78/manuals/r.neighbors.html
2020-08-05 06:28:12 +10:00
Andrea Giudiceandrea
ef11ad32b1 Don't load GRASS algs if GRASS is not installed
Fixes qgis_process that incorrectly lists GRASS algorithms among the available processing algs even when GRASS is not installed in the system
2020-08-04 14:51:34 +10:00
rldhont
f5b819fc4c [Tests] Check that GDAL Assign Projection updates QgsRasterLayer info 2020-07-31 14:32:48 +02:00
rldhont
6c44073ff0 [Processing] Fix GDAL Assign Projection: update QgsRasterLayer crs
Even if the projection is assign, the QgsRasterLayer and the QgsRasterDataProvider was not updated.

The fix reloads the QgsRasterDataProvider's data and updates the QgsRasterLayer's crs.

Fixed #37920
2020-07-31 14:32:48 +02:00
Nyall Dawson
e19f27d289 [processing] Fix hidden column names show in batch processing dialog,
throwing the table contents out of sync with the headers

Also make code a bit more robust

Fixes #38054
2020-07-31 16:03:28 +10:00
Nyall Dawson
fd19167c0a [processing] Show some more warnings when spatial indexes are missing but desirable 2020-07-31 03:07:07 +10:00
Nyall Dawson
68c7cfb65f Use correct coordinate transform context in Raster Calculator algorithm 2020-07-30 08:26:40 +10:00
Nyall Dawson
0a556a8161 Gracefully handle no project available in context in algorithms
where a project is only required in some circumstances
2020-07-30 08:26:40 +10:00
Nyall Dawson
d57a638ec4 Add a processing algorithm flag to indicate that an algorithm requires
a valid project to be set in the context in order to execute

And flag a bunch of algorithms which require this
2020-07-30 08:26:40 +10:00
Nyall Dawson
687398415b [processing] Flag a bunch of algorithms to hide them from qgis_process 2020-07-30 08:26:40 +10:00
Nyall Dawson
b40bfbbf4c Use direct getters for ellipsoid/units in processing algs
Refs #37988
2020-07-30 08:26:40 +10:00
Nyall Dawson
19504adf55 Allow running "Add x/y fields" in place 2020-07-28 14:18:20 +10:00
Nyall Dawson
2104ae613a [processing] Add mechanism for algorithms to alter their core behavior
(e.g. parameters) when they are run in the "edit in-place" mode

This allows algorithms to dynamically adapt their behavior to make them compatible
with in-place mode. Previously, some useful algorithms could not be
run in-place because they alter a layer's structure (e.g. adding new
fields).

Now, these algorithms have a means to detect that they are being
run in-place and change their input parameters accordingly. E.g.
an algorithm which usually adds new fields to store calculated
values (such as "add xy fields to layer") could instead expose
field parameter choices to ask the user to pick from existing
fields in which to store the calculated values, thereby avoiding
the need to change the table structure and making them eligable
for running in-place mode.

Note that this needs to be handled algorithm-by-algorithm, it's
not automatic! It's just the raw api to allow this...
2020-07-28 14:18:20 +10:00
Nyall Dawson
6e2d1023f2 [processing] Fix loading batch settings with date/time values
Fixes #37838
2020-07-27 14:19:49 +10:00
Nyall Dawson
95bd7b296b [feature][processing] New algorithm "Align points to features"
This algorithm calculates the rotation required to align point features
with their nearest feature from another reference layer. A new field is
added to the output layer which is filled with the angle (in degrees,
clockwise) to the nearest reference feature.

Optionally, the output layer's symbology can be set to automatically
use the calculated rotation field to rotate marker symbols.

If desired, a maximum distance to use when aligning points can be set,
to avoid aligning isolated points to distant features.

Designed for use cases like aligning building point symbols to follow
the nearest road direction!
2020-07-26 09:56:46 +10:00
nirvn
aa05f7641a [processing] Fix python error when attempting to re-open generate XYZ tiles algorithm from the history dialog 2020-07-24 13:33:11 +07:00
Peter Petrik
d9f18ccb9c
Fix spelling (#37849)
fix the spelling errors
2020-07-21 12:51:48 +02:00
Andrea Giudiceandrea
33fe1eac27 Fix invalid randompointsonlines algorithm ID in menus.py
Fix invalid algorithm ID for menu: qgis:randompointsonlines
The valid algorithm ID is native:randompointsonlines
2020-07-21 09:07:51 +10:00
Germán Carrillo
debe2209fe Add placeholder to ProcessingConfig (Setting class); use the placeholder for 'results group name' setting 2020-07-20 14:54:50 -05:00
Germán Carrillo
bf6f4c51e4 Load processing results to layer group (optional) 2020-07-20 12:25:06 -05:00
Nyall Dawson
1219f55378 [processing] Fix and improve how in place algorithm parameter widget
handles the input layer by creating a new QgsProcessingHiddenWidgetWrapper
wrapper subclass

Fixes #37424
2020-07-10 04:44:30 +10:00
Alexander Bruy
bc8b55e1f7 add tests 2020-07-08 12:43:51 +03:00
Nyall Dawson
457a526916 [processing] Fix batch panel uses layer ids when auto populating
output names based on a layer parameter

Fixes #37554
2020-07-05 07:08:37 +10:00
Håvard Tveite
2a786aede2
[feature][processing] Random points in polygons C++ algorithm
Offers the same functionality as the Random points inside polygons
algorithm, and in addition it includes (possible to opt-out) the attributes
from the containing polygon and the ability to specify a seed for the random
number generator.

Could replace the Python algorithm Random points inside polygons, but
this C++ implementation only supports "Points count" ("number of points
for each feature") directly, while "Points density" is supported by allowing the
point count to be data defined (using the polygon area to calculate the
number of points).
2020-07-02 08:25:42 +10:00
Alessandro Pasotti
672d6ec5b2 Fix test: cast to float 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
4304d8636d Fix precision in test 2020-06-20 04:30:18 +10:00
Alessandro Pasotti
50f66ba3cb Increase tolerance when comparing floats in processing tests 2020-06-20 04:30:18 +10:00
Even Rouault
93bc7c2f04 Raster rendering: enable provider-side resampling when available, and reprojection is done 2020-06-20 04:29:36 +10:00
Nyall Dawson
ef19911f11 [processing][grass] Correctly return the actual generated filename
locations as the algorithm results, don't just echo back the parameter
value

Otherwise we don't return the correct value for temporary file locations
or for file paths during model execution

Fixes #36379
2020-06-12 05:00:49 +10:00
Alexander Bruy
7d58502b3b
Merge pull request #37097 from alexbruy/processing-tests
reduce precision when checking service area test results
2020-06-10 17:09:04 +03:00
Alexander Bruy
de6ec479f0 reduce precision when checking service area test results 2020-06-10 14:44:41 +03:00
Alessandro Pasotti
954ab15276
Merge pull request #37074 from alexbruy/fix-servicearea
fix saving attributes in the service area algorithm
2020-06-10 09:26:59 +02:00
nirvn
5385ae64d4 [processing] Make gdaladdo optional parameters truly optional 2020-06-10 13:13:58 +07:00
Alexander Bruy
18195e2ad0 fix saving attributes in the service area algorithm 2020-06-10 07:44:52 +03:00
nirvn
291ba7f2dc {Qgis,QGis} -> QGIS 2020-06-06 17:45:43 +07:00
Alexander Bruy
9e27f1487c fix menu entry for Split Vector Layer algorithm 2020-06-04 05:36:19 +10:00
Nyall Dawson
48c465e9b5 [processing] Port "Aggregate" algorithm to c++
No more silly breakages!

Refs #36843
2020-06-03 15:17:56 +10:00
Nyall Dawson
d5a340f886 [processing] Port aggregates widget wrapper to c++
And add a TON of tests

Fixes #36843
2020-06-03 15:17:56 +10:00
Nyall Dawson
4fdfa949cf [processing] Start porting Aggregates parameters to C++
Port parameter type to c++
2020-06-03 15:17:56 +10:00
Nyall Dawson
b4c3acd447 Remove unused file 2020-06-02 08:43:54 +10:00
Nyall Dawson
f0bb647c61 [processing] Add a stable way to get processing widgets to stretch vertically 2020-06-02 08:43:54 +10:00
Nyall Dawson
146094f6b2 [processing] Port field mapper wrapper and widget to c++
Fixes #36706
2020-06-02 08:43:54 +10:00
Nyall Dawson
dbe9aa0902 [processing] Port Refactor Fields to c++
Having this core algorithm in Python has proved just too unreliable

Refs #36706, refs #36843
2020-06-02 08:43:54 +10:00
Nyall Dawson
191e362ed4 Move FieldMapper parameter type to c++
Fixes sip "forgeting" about Python overrides for the type definition

Refs #36706
2020-06-02 08:43:54 +10:00
Alexander Bruy
072c76747c fix calculating raster size in the TIN and IDW algorithms to maintain
accurate pixel size (fix #31970)
2020-05-29 11:26:22 +03:00