Nyall Dawson
a6736ceb77
Add ability to select output fields from both layers to Intersection algorithm
2017-07-15 17:40:45 +10:00
Nyall Dawson
02bf88c4b7
Port Line Intersection algorithm to new API
...
Improvements
- allow different CRS between layers
- instead of optionally allowing selection of a single field to keep from
both inputs, allow selection of multiple fields
2017-07-15 17:40:45 +10:00
Alexander Bruy
671f024789
fix tests
2017-07-15 09:30:21 +03:00
Alexander Bruy
f3f9e544ab
[processing] restore Hillshade algorithm
2017-07-15 09:29:35 +03:00
Alexander Bruy
f4bba54a11
[processing] restore Ruggedness algorithm
2017-07-15 09:29:35 +03:00
Alexander Bruy
05b4cc22bf
[processing] restore Slope algorithm
2017-07-15 09:29:35 +03:00
Nyall Dawson
2e8b84867e
Port sum line length algorithm to new API
...
and implement auto reprojection of lines to polygon layer CRS
2017-07-15 15:56:04 +10:00
Nyall Dawson
dd38c52dd8
[needs-docs] Copy unique class field option from Points in Polygons Unique
...
to Points in Polygons
Again, it doesn't make sense for a whole separate algorithm just to
add a single option
2017-07-15 14:50:15 +10:00
Nyall Dawson
b67e525f29
[needs-docs] Add optional weight field to Points In Polygon algorithm
...
Instead of a separate Points In Polygon algorithm just for this
extra option, add it to the original Points In Polygon algorithm
as a non-default option.
2017-07-15 14:50:10 +10:00
Nyall Dawson
68687c1e04
Port counts points in polygon alg to new API
...
and add auto-reprojection support if points layer is in
different CRS to polygon layer
2017-07-15 14:23:07 +10:00
Mathieu Pellerin
b5dc9fd3cd
[processing] restore and improve lines to pol / pol to lines algs ( #4850 )
...
New geometry model for lines to pol / pol to lines agls.
2017-07-14 14:44:38 +07:00
Alexander Bruy
b01ffa5cd4
[processing] add test for heatmap algorithm
2017-07-13 12:11:42 +03:00
Alexander Bruy
56208540f9
[processing] remove GeoAlgorithmExecutionException
2017-07-13 09:02:24 +03:00
Mathieu Pellerin
d3ad9131f4
[processing] restore intersection algorithm ( #4849 )
2017-07-13 11:07:01 +07:00
Nyall Dawson
91d6ac9537
Update script algorithms for auto output creation
2017-07-12 07:50:13 +10:00
Nyall Dawson
1e13d733c2
Move declaration of algorithm parameters/outputs to a new virtual
...
initAlgorithm() method
This allows 2 benefits:
- algorithms can be subclassed and have subclasses add additional
parameters/outputs to the algorithm. With the previous approach
of declaring parameters/outputs in the constructor, it's not
possible to call virtual methods to add additional parameters/
outputs (since you can't call virtual methods from a constructor).
- initAlgorithm takes a variant map argument, allowing the algorithm
to dynamically adjust its declared parameters and outputs according
to this configuration map. This potentially allows model algorithms which
can be configured to have variable numbers of parameters and
outputs at run time. E.g. a "router" algorithm which directs
features to one of any number of output sinks depending on some
user configured criteria.
2017-07-10 16:31:14 +10:00
Nyall Dawson
03275bbace
Split QgsProcessingAlgorithm::create into non virtual-create
...
and pure virtual createInstance
Allows us to add logic which always need applying within
create(), leaving createInstance() free to just return a
raw new instance of the class
2017-07-10 10:07:32 +10:00
Nyall Dawson
f49b603443
Split QgsProcessingModelAlgorithm into separate components
...
The cpp/h file was getting too large, so split off the individual
subcomponents into their own h/cpp files to keep code
maintainable.
2017-07-08 20:49:17 +10:00
Nyall Dawson
9d04f87249
Rename "output" style parameters for clarity
...
The previous naming was too easily confused with processing outputs.
Rename them to QgsProcessingParameterFileDestination, etc... to
make it clearer what they are used for.
2017-07-08 20:49:17 +10:00
Nyall Dawson
05e8928e30
Use native algorithms for processing tests where possible
...
And fix a few issues in the dissolve algorithm
2017-07-07 13:49:43 +10:00
Nyall Dawson
a15d283cd6
Port delaunay triangulation alg to new API
2017-07-07 09:28:19 +10:00
Nyall Dawson
75cd91b1a0
Port voronoi polygons algorithm to new API
2017-07-07 09:28:19 +10:00
Nyall Dawson
90f10ae853
Port snap geometries algorithm to new API
2017-07-07 09:28:19 +10:00
Nyall Dawson
05364aa5f0
When running algorithm tests, if two parameters share the same
...
layer source, ensure that the actual parameter values point
to the same layer
2017-07-07 09:28:19 +10:00
Nyall Dawson
ab06973d6a
Don't try to load default styles in processing test layers
2017-07-07 09:28:19 +10:00
Nyall Dawson
8a84e134cc
Algorithms don't have to be split to prepare/process/postProcess
...
Since it's safe to evaluate parameters in background threads
now, it's usually going to be ok to evaluate everything in
the processAlgorithm step.
This keeps the algorithm code as simple as possible, and will
make porting faster.
Note that the prepare/postProcess virtual methods still exist
and can be used when an algorithm MUST do setup/cleanup work
in the main thread.
2017-07-07 09:28:19 +10:00
Nyall Dawson
274d684f64
Fix procesing test layer loading
2017-07-07 09:28:19 +10:00
Nyall Dawson
b917a82662
Better debuging from processing alg tests
2017-07-07 09:28:19 +10:00
Nyall Dawson
e0c7daa2d8
Rename QgsProcessingAlgorithm::clone to ::create
...
Since it better describes what the function does. It returns a new
pristine copy of the algorithm, not a clone of its current state
2017-07-07 09:27:35 +10:00
Nyall Dawson
cd7776ca1c
Upgrade ported python algs to be thread ready
2017-07-07 09:27:35 +10:00
Nyall Dawson
1b2afea23e
Add some more clone methods to algorithm subclasses
2017-07-07 09:26:17 +10:00
Nyall Dawson
8379f9bb98
Merge pull request #4791 from nyalldawson/reproj_test
...
Use native projection algorithm for unit test
2017-06-29 09:30:16 +10:00
Nyall Dawson
468e44dc3a
Use native projection algorithm for unit test
2017-06-29 08:33:34 +10:00
Nyall Dawson
d2b9652d4b
Fix use of direct map layers as inputs for source parameters
2017-06-29 08:00:47 +10:00
Nyall Dawson
d1a93e0e13
Restore points layer from table algorithm
2017-06-28 17:38:17 +10:00
Nyall Dawson
7f7842a11d
Merge pull request #4783 from nyalldawson/script
...
processing: restore script algorithm provider and tests
2017-06-27 14:15:36 +10:00
Nyall Dawson
e171fe30c0
Restore script based algorithm tests
2017-06-27 13:18:22 +10:00
Nyall Dawson
792a252ef8
Fix script algorithm centroids tests
2017-06-27 11:12:20 +10:00
Nyall Dawson
1468eef635
Merge pull request #4781 from nyalldawson/centroid_tests
...
Reenable centroid algorithm tests
2017-06-27 10:34:23 +10:00
Nyall Dawson
11f42eb432
Reenable centroid algorithm tests
2017-06-27 09:46:56 +10:00
Nyall Dawson
d16f117b6c
Port conversion to/from script code to c++
2017-06-27 08:33:13 +10:00
Nyall Dawson
b88ad8e1ce
Port Fix Geometry algorithm to new API
2017-06-26 12:44:26 +10:00
Nyall Dawson
ebe0ebdb9c
Fix (unwanted) python exception in algorithm test
2017-06-24 07:36:30 +10:00
Mathieu Pellerin
b7e66b4f72
[processing] restore simplify geometries & smooth algorithms ( #4766 )
2017-06-23 14:46:40 +07:00
Nyall Dawson
c3e24b76b5
Fix some processing tests where output is not generated or should
...
not be compared
2017-06-23 12:48:58 +10:00
Nyall Dawson
a8cdde5232
Add test that python exception is caught when executing an alg
2017-06-23 12:08:54 +10:00
Nyall Dawson
93b7c2809e
Report success or failure after running algs
...
And auto catch python exceptions and report failure of model
2017-06-23 12:08:54 +10:00
Nyall Dawson
531e1a3282
Update tests
2017-06-22 18:53:36 +10:00
Nyall Dawson
66d1a588ae
Restore regular points alg
2017-06-22 18:20:56 +10:00
Nyall Dawson
db00cb1cdb
Resurrect a processing test
2017-06-22 18:15:38 +10:00