4003 Commits

Author SHA1 Message Date
Nyall Dawson
08231b8b14 Merge pull request #3742 from nirvn/processing_fix_hasdependencies
[processing] check for parent alg dependencies in hasDependencies()
2016-11-12 15:09:26 +10:00
Nyall Dawson
28d7ceaef5 Some fixes to processing expression parameters 2016-11-11 20:13:12 +10:00
nirvn
f3d7e39abb [processing] harmonize modeler UI behavior with QGIS
- use [close without saving][cancel][save] option when closing
a modeler with unsaved changes
- invert mouse wheel zoom in/out to match that of QGIS' main
canvas window
- holding the mouse middle click and dragging will pan the
modeler view
2016-11-11 15:47:42 +07:00
nirvn
be2223fed3 [processing] check for parent alg dependencies in hasDependencies() 2016-11-11 13:08:01 +07:00
Nyall Dawson
156fce989d Add unit tests for processing expression parameter 2016-11-11 13:26:31 +10:00
Nyall Dawson
5625d6e9b6 Expression parameters don't have to have parent layers 2016-11-11 13:26:31 +10:00
Nyall Dawson
132e76a596 [FEATURE][processing] New input type for expressions
This adds a new input type for expression inputs. Expression
inputs can be linked to a parent layer so that the builder
shows the correct fields and layer variables.

It's designed for two use cases:

1. to be used when an algorithm specifically requires an expression,
eg Select by Expression and Extract by Expression.

2. to be potentially used as a replacement input instead of string
or number literals in algorithms. Eg - if the simplify algorithm
tolerance parameter was replaced with an expression paremeter, then
this expression would be evaluated for every feature before
simplifying that feature. It would allow parameters to be calculated
per feature, as opposed to the current approach of calculating
a parameter once before running the algorithm. It would also
mean algorithms like "variable distance buffer" would no longer
be needed, as a single "buffer" algorithm could then be used
for either a fixed distance, field based, or expression based
distance.
2016-11-11 13:26:31 +10:00
Nyall Dawson
72118f91f9 [processing] When an algorithm has string parameters, also
accept numeric, file and table field inputs in modeler

This allows a non-string parameter to be reused as a string
parameter in contexts where it makes sense.
2016-11-11 13:26:31 +10:00
Alvaro Huarte
dc800dbab7 Fix iteration of features 2016-11-11 00:28:27 +01:00
Nyall Dawson
10648dfb0c [processing] Start of tests for modeler 2016-11-11 08:35:38 +10:00
Alexander Bruy
51a56573c5 Merge pull request #3727 from arnaud-morvan/processing_ogr2ogr_defaults
[processing] fix Ogr2OgrToPostGisList algorithm
2016-11-10 11:45:56 +02:00
nirvn
45711d372e [processing] use algorithm description in modeler dependencies dialog 2016-11-10 10:21:12 +07:00
volaya
72fddb8b5e Merge pull request #3470 from arnaud-morvan/refactor_fields_context_generator
[Processing] Fix processing refactor fields algorithm using expression context generators
2016-11-08 10:45:32 +01:00
volaya
7c4e66b360 Merge pull request #3726 from arnaud-morvan/processing_various_fixes
[processing] small fixes
2016-11-08 10:30:06 +01:00
Nyall Dawson
3550cc99a6 [processing] Allow algorithms to specify tags
Tags are used while searching in the toolbox. This should help with
finding algorithms when the exact name is not known, eg
you could search for "envelope" or "bounds" and find the
'Polygon from Layer Extent' algorithm.

At the moment it's quite hard to discover algorithms which exist
when you don't know what their called and have to instead search
for every possible naming variant which could exist...
2016-11-08 10:15:31 +10:00
Nyall Dawson
1a4f8f59f1 [processing] When searching in toolbox, ignore order of words
Eg, allows you to search "line merge" and find the "Merge lines"
algorithm. Should make it easier for users who don't know the
exact name to find algorithms.
2016-11-08 09:30:52 +10:00
Nyall Dawson
fd15090521 Update identation 2016-11-08 08:51:22 +10:00
Nyall Dawson
4e4bb2bf6b Merge pull request #3728 from nyalldawson/open
Cleanup processing file handling
2016-11-07 13:20:13 +10:00
Nyall Dawson
8acc286b0f [FEATURE] Snap to layer algorithm accepts a mode parameter
With a new option to prefer to snap to closest point on geometry.
The old behaviour was to prefer to snap to nodes, even if a node
was further from the input geometry than a segment. The new option
allows you to snap geometries to the closest point, regardless
of whether it's a node or segment.
2016-11-07 12:20:59 +10:00
Nyall Dawson
dae0a01761 [FEATURE][processing] Snap geometries algorithm allows snapping
to other layer types, supports point/line layers

Fix #14791, #15313
2016-11-07 12:20:59 +10:00
Nyall Dawson
c3a978b9da [FEATURE][processing] Snap geometries to layer algorithm
Port the Geometry Snapper plugin across to the analysis lib, and
expose to python bindings

Add a new algorithm which performs the snapping to layers
2016-11-07 12:20:59 +10:00
Nyall Dawson
0484769b7d [processing] Use subprocess.DEVNULL instead of open(os.devnull) 2016-11-07 12:13:18 +10:00
Nyall Dawson
6a99017bf0 [processing] Use with ... when opening files 2016-11-07 11:36:38 +10:00
Nyall Dawson
b4bca5bb98 [processing] Don't try to force load files which don't exist 2016-11-07 11:11:31 +10:00
Nyall Dawson
272cd38018 Fix python deprecation warning 2016-11-07 11:11:30 +10:00
Nyall Dawson
d783c732a5 Fix processing tests 2016-11-07 11:11:30 +10:00
Nyall Dawson
eefa7115bf [processing] Fix invalid geometries made by densify when input geom is null 2016-11-07 09:22:50 +10:00
arnaud.morvan@camptocamp.com
78236c0be1 Use contextGenerator in refactor fields algorithm 2016-11-06 18:11:15 +01:00
arnaud.morvan@camptocamp.com
a6a09d9ae2 [processing] Fix Ogr2OgrToPostGisList with 8798c42339 and 3472ac80d8bd 2016-11-06 15:25:11 +01:00
arnaud.morvan@camptocamp.com
01941176c5 [processing] Log gdal calls 2016-11-06 15:21:39 +01:00
arnaud.morvan@camptocamp.com
4a62699472 [processing] Fix TableWidgetWrapper in batch dialog 2016-11-06 13:05:32 +01:00
arnaud.morvan@camptocamp.com
2d2fe8b8cc [processing] Fix BatchOutputSelectionPanel with QgsMapLayer instances 2016-11-06 13:04:32 +01:00
arnaud.morvan@camptocamp.com
93be141af5 [processing] Fix import error in FieldsMappingPanel 2016-11-06 13:03:06 +01:00
Alexander Bruy
8b3c39a220 [processing] add missed description files for OTB 5.4.0 2016-11-03 16:58:18 +02:00
Nyall Dawson
9cd29f39d8 [processing] Fix batch panel under Qt5 2016-11-03 16:33:09 +10:00
nirvn
03e29d4f01 [processing] optimise singlepart to multipart algorithm
- keep z/m/curved geometries intact
- rewrite loop to avoid the cost of nb. feature x unique values
2016-11-03 09:05:31 +07:00
Nyall Dawson
a44ea22880 Small refinement to multipart to singlepart alg 2016-11-03 05:40:11 +10:00
Alexander Bruy
1c44d7471f Merge pull request #3695 from nirvn/processing_modeler_dblclick
[processing] resurrect editing of modeler item on double-click
2016-11-02 14:16:27 +02:00
Alexander Bruy
5d877fd888 Merge pull request #3707 from nyalldawson/multipart_to_single
[processing] optimise multipart to singlepart algorithm
2016-11-02 10:06:25 +02:00
Nyall Dawson
18fc0c6fad [processing] optimise multipart to singlepart algorithm
- simplify code
- keep z/m/curved geometries intact
- might be a bit faster
2016-11-02 16:06:00 +10:00
Nyall Dawson
f65e770242 [FEATURE[processing] New algorithm to compute geometry by expression
This algorithm updates existing geometries (or creates new
geometries) for input features by use of a QGIS expression. This
allows complex geometry modifications which can utilise all the
flexibility of the QGIS expression engine to manipulate and create
geometries for output features.
2016-11-02 16:05:46 +10:00
Juergen E. Fischer
d3c7a04193 fix typo
(cherry picked from commit 658cfe68c91ec24f04f8ebda307fbec7d55a412f)
2016-11-01 13:51:49 +01:00
Juergen E. Fischer
7a326b1b8d fix typos 2016-11-01 13:46:29 +01:00
Nyall Dawson
88871c2320 Merge pull request #3696 from nirvn/processing_otb_silent
[processing] remove console error message when optional otb provider not installed
2016-10-31 16:24:44 +10:00
nirvn
8e663309c0 [processing] remove console error message when optional otb provider not installed 2016-10-31 12:53:42 +07:00
Nyall Dawson
dd4b34ed16 [processing] Modeller should not be modal 2016-10-31 14:37:45 +10:00
nirvn
b48d20220e [processing] resurrect editing of modeler item on double-click 2016-10-31 11:18:22 +07:00
nirvn
bec379249e [processing] sort model input parameters to avoid random ordering 2016-10-31 10:53:13 +07:00
Nyall Dawson
3caccd531d [processing] Fix handling of multiple field input in modeller 2016-10-31 11:41:40 +10:00
Nyall Dawson
a117df2205 Merge pull request #3656 from nirvn/processing_import_to_spatialite
[processing] add "Import into Spatialite" algorithm
2016-10-31 09:14:19 +10:00