3050 Commits

Author SHA1 Message Date
Nyall Dawson
6517470ddd Temporarily fix memory layer outputs 2017-06-06 07:41:19 +10:00
Nyall Dawson
87fc31d6de Adapt more python code to new API 2017-06-06 07:41:19 +10:00
Nyall Dawson
28f7a8b7e1 Move expression context generation out of parameters 2017-06-06 07:41:19 +10:00
Nyall Dawson
416770b197 Remove no longer required _resolveLayers method 2017-06-06 07:41:19 +10:00
Nyall Dawson
ba03f1a13a Move minimum layer extent calculation to c++ 2017-06-06 07:41:19 +10:00
Nyall Dawson
189f804714 Adapt more code to c++ API 2017-06-06 07:41:19 +10:00
Nyall Dawson
ef59d0c454 Port parameter checking to c++ 2017-06-06 07:41:19 +10:00
Nyall Dawson
c1d9d57dd2 First working pure c++ algorithms 2017-06-06 07:41:19 +10:00
Nyall Dawson
4cb7d18b1c Push parameters into processAlgorithm and related functions 2017-06-06 07:41:19 +10:00
Nyall Dawson
f1c53c3aa4 Refactor Algorithm setParamValues -> getParamValues
Now returns a dict of parameter inputs for the algorithm
2017-06-06 07:41:19 +10:00
Nyall Dawson
9997ab6e1e Partially port wrappers to QgsProcessingParameterDefinition
And create a new WidgetWrapperFactory for creating a suitable wrapper
corresponding to a parameter
2017-06-06 07:41:19 +10:00
Nyall Dawson
77ab933788 Move alg character definitions to __init__ 2017-06-06 07:41:19 +10:00
Nyall Dawson
134c04b8bb Move getParametersPanel out of algorithm class
It's a gui related method, so shouldn't be in core class
2017-06-06 07:41:19 +10:00
Nyall Dawson
168f16276c Remove help related methods from GeoAlgorithm 2017-06-06 07:41:19 +10:00
Nyall Dawson
2d1579d28a Port algorithm help to QgsProcessingAlgorithm 2017-06-06 07:41:19 +10:00
Nyall Dawson
1e788556f0 Port getCustomParametersDialog to QgsProcessingAlgorithm 2017-06-06 07:41:19 +10:00
Nyall Dawson
fb811766f8 Add framework for algorithm outputs
This somewhat changes the meaning of outputs from processing 2.x.
In 2.x processing outputs were used both as a method of specifying
inputs to algorithms (file paths to destination layers created
by the algorithm) AND pure outputs (such as statistics calculated
by the algorithm).

This is now split. The old input-type-outputs (destination layers)
are now input parameters (since the parameter value IS an input to the
algorithm). To differentiate them from parameters indicating pure
input layers a new "isDestination()" method was added to
QgsProcessingParameterDefinition.

Output definitions are now purely indications of values CREATED
by the algorithms. Suitable candidates are the existing calculated
stats and actual file path/URI of any layers created by the algorithm.
Moving forward we should ensure all algorithms output as much
useful information as possible - e.g. number of features processed,
number of skipped features, count null geometries encountered, etc...
2017-06-06 07:41:19 +10:00
Nyall Dawson
fac8ca4d4f Move execution check to QgsProcessingAlgorithm 2017-06-06 07:41:19 +10:00
Nyall Dawson
03e40f7497 [processing] Remove all remaining algorithm copies
Algorithms are no longer copied - just a single const instance
of each algorithm is used
2017-06-06 07:41:19 +10:00
Nyall Dawson
b64a71df61 Port algorithm countVisibleParameters to c++ 2017-06-06 07:41:19 +10:00
Nyall Dawson
2da85f8771 Temporarily deactivate all processing providers/algorithms
While the processing API is in such a state of flux it's
become unmaintainable to port these algorithms change-by-change.
Instead, disable them all until the API is fixed, and then we
can port them algorithm by algorithm and reactivate each
test in turn.
2017-06-06 07:41:19 +10:00
Matthias Kuhn
e3efc2c838 Fix tests 2017-06-02 19:53:37 +02:00
Matthias Kuhn
e2227d9998 Fix QgsPointXY issues 2017-06-02 19:53:37 +02:00
Matthias Kuhn
4ba385d4e1 Fix python plugins 2017-06-02 19:53:37 +02:00
Matthias Kuhn
a9d7630a69 Rename QgsPointV2 to QgsPoint and QgsPoint to QgsPointXY
Because 3D coordinates should be the default.

References https://github.com/qgis/qgis3.0_api/issues/36
2017-06-02 19:53:37 +02:00
Alexander Bruy
74984b2525 [processing] always look for SAGA LTR first (fix #16648) 2017-06-02 10:08:22 +03:00
Alexander Bruy
19cfa83e4e [processing] fix description for GRASS 7 v.drape algorithm (fix #16175) 2017-06-02 09:21:53 +03:00
Alexander Bruy
dc5ba8ffe9 [processing] explisitly load outputs as raster or vector depending
on the output type. Don't rely on extension or other indirect attributes
2017-05-26 13:30:23 +03:00
Salvatore Larosa
48ecee5643 [processing] fix duplicates fields name in field calculator algorithm when switching between layers (followup c2699b4) 2017-05-22 23:29:26 +02:00
Alexander Bruy
b9929d4c2a [processing][needs-docs] always use SAGA shipped with QGIS (refs #16422) 2017-05-19 09:00:02 +03:00
Nyall Dawson
5a0bcf0776 Style fixes 2017-05-17 21:33:48 +10:00
Nyall Dawson
56c8baaccb Provide a standard string comparison method in QgsLocatorFilter
Subclasses should use this method instead of directly calling
QString::contains or using Python 's in search' type matches.
This ensures consistent matching behaviour across different filters.
2017-05-17 21:33:47 +10:00
Nyall Dawson
6649d2b1ed Sort filter results so closer matches appear higher
A closer match means more of the text is matched, ie
a short string inside a long string is penalised
2017-05-17 21:33:47 +10:00
Nyall Dawson
102a46662b Implement prefix based locator searching
Filters can indicate their preferred search prefix. Searches which
begin with this character will be restricted to the single matching
filter.

E.g. entering 'l buffer' will searching only layers containing 'buffer'

Other prefixes are:
- . search actions
- pl search print layouts
- a search algorithms

Plugins are restricted to a minimum 3 character prefix. We do this
to avoid plugins 'stealing' desirable prefixes, and instead we
want to reserve them for future core filters.
2017-05-17 21:33:47 +10:00
Nyall Dawson
b33ce0bf47 Allow speciyfing the priority for filters
Higher priority (i.e. more important) filter results get shown
first. This means filters like project layers & composers will
show above 'cruder' filters like the actions/processing filters.
2017-05-17 21:33:47 +10:00
Nyall Dawson
0f80df09a7 Show locator filter names in results, sort results and group by filter 2017-05-17 21:33:47 +10:00
Nyall Dawson
0dd3fcb6e4 Add processing algorithms to locator bar
Inspired by the ghost of processing's commander
2017-05-17 21:33:47 +10:00
Alexander Bruy
84871ce00d [processing] temporarily disable singleparts to multiparts test 2017-05-17 08:26:47 +03:00
Alexander Bruy
fe7c981aea [processing] handle NULL values in the single to multi algorithm (fix #15822) 2017-05-16 13:43:42 +03:00
Alexander Bruy
11475c621d Revert "Merge pull request #4562 from alexbruy/processing-singletomulti-3"
This reverts commit e3d79a1fe940b5d813b5f79c51b43393d085bb16, reversing
changes made to 3f7f95ee262ea3646d61600c21faed0866bc70b0.

Reverting again, as Travis started failing after merging PR (with all
test passed) into master branch
2017-05-16 13:42:47 +03:00
Alexander Bruy
b56e46dad4 [processing] handle NULL values in the single to multi algorithm (fix #15822) 2017-05-16 10:06:26 +03:00
Nyall Dawson
ae97c333d6 Revert "Port algorithm countVisibleParameters to c++"
This reverts commit c3c694f8ccfbe0b64df14365f950f5895968a66a.
2017-05-15 10:24:38 +10:00
Nyall Dawson
c3c694f8cc Port algorithm countVisibleParameters to c++ 2017-05-15 08:44:28 +10:00
Alexander Bruy
6fe459de14 [processing] remove extra quotes when restoring batch process from file
(fix #16309)
2017-05-13 11:14:17 +03:00
Alexander Bruy
c620c7c306 [processing] stop algorithm execution if geometry/feature error occured
(fix #11986)
2017-05-13 09:45:37 +03:00
Alexander Bruy
e01b7ef60a [processing] take in account file extension when loading Processing
results (fix #16486)
2017-05-12 17:28:41 +03:00
Nyall Dawson
75a5d5dda1 Remove unused skipAttributeCreation option in QgsVectorLayerExporter::exportLayer 2017-05-12 08:03:23 +10:00
Nyall Dawson
384369c3c4 Rename QgsVectorLayerImport to QgsVectorLayerExporter
Since the majority of users of this class will be exporting
an existing map layer to a data provider, the QgsVectorLayerImport
name is misleading and suggests that this class is designed
just to bring layers "into" QGIS.

Explicitly naming the class "Exporter" should help API users
discover this class.

Also cleanup API and improve docs
2017-05-12 08:02:51 +10:00
Alexander Bruy
abc74b4262 [processing] don't apply -te and -te_srs if not requested (fix #16519) 2017-05-10 15:47:29 +03:00
Matthias Kuhn
aa021bef0c Merge pull request #4307 from ghtmtt/proc_tests
[processing] other qgis test, clean commit
2017-05-10 09:07:59 +02:00