14975 Commits

Author SHA1 Message Date
Nyall Dawson
7e80fc8391 Drop isWindows/isMac from stable Processing API 2019-03-28 11:47:23 +10:00
Nyall Dawson
64387a2254 [needs-docs][processing] Monkey patch stable external Processing API into qgis.processing
Instead of encouraging use of the internal Processing modules
(e.g. from processing.tools.general import run , import processing, ...)
instead expose all Python specific STABLE processing additions
to the qgis.processing module.

Instead, scripts and plugins should now use

from qgis.processing import run, algorithmHelp,...

This makes a clear distinction between internal Processing python
modules (i.e., everything else!) and the parts of Processing
which are stable and designed to be used by plugins and scripts.

TODO: QGIS 4.0 -- move the internal Processing plugin modules
to __processing, to clearer indicate that this is all internal
stuff.
2019-03-28 11:47:23 +10:00
Nyall Dawson
bf7d9cb6f8 Don't use copyright license as a module docstring 2019-03-28 11:47:23 +10:00
Denis Rouzaud
631c7016db
scope enum for QgsProcessing::LayerHint (#9639) 2019-03-27 17:23:36 -05:00
Nyall Dawson
858e5d0209 Sipify 2019-03-27 12:53:15 +10:00
Nyall Dawson
545e8bcf2c Add utility class for proj to Python bindings 2019-03-27 12:53:15 +10:00
Nyall Dawson
ef8d893393 More QgsMapLayer python fixes 2019-03-27 09:11:15 +10:00
Nyall Dawson
ac651ee0d9 Followup 8d51a693, fix broken plugins 2019-03-27 07:20:43 +10:00
Denis Rouzaud
8d51a693a1 missing changes of QgsMapLayer::Type => QgsMapLayerType 2019-03-26 14:09:19 -05:00
Denis Rouzaud
60682885c0
Small tweak to enum Python docs (#9631)
original credits to @nyalldawson
2019-03-26 14:00:37 -05:00
Denis Rouzaud
f000956e86
Merge pull request #9437 from 3nids/maplayertype_enum
create scope based enum for QgsMapLayer::LayerType >> QgsMapLayerType
2019-03-26 10:28:34 -05:00
henrik
cf63e00500 Added tests for PointDisplacementRenderer labels. 2019-03-26 18:17:12 +10:00
henrik
6fb06738ec [FEATURE] [needs-docs] Point Displacement label distance factor
Adds label distance factor spinbox to Point Displacement symbology
window. Calculates label distance based on the current symbology
diagonal instead of a general maximum diagonal.

Replaces the hard coded distance "symbolDiagonal/2.0" with
"symbolDiagonal*mLabelDistanceFactor", where mLabelDistanceFactor is set
to the spinbox value.

 It's an old feature request (Point displacement labels adjustable
offsets "https://issues.qgis.org/issues/5945").
2019-03-26 18:17:12 +10:00
Alessandro Pasotti
09fe865094
Merge pull request #9616 from elpaso/html-widget
HTML form widget
2019-03-26 08:04:50 +01:00
Alessandro Pasotti
0aa326b9f9 Enable webview tools and fix some minor dox issues 2019-03-25 18:09:13 +01:00
Denis Rouzaud
e232817e5b add missing doc 2019-03-25 11:00:17 -05:00
Blottiere Paul
daf53a1e08
Merge pull request #9611 from pblottiere/server_log_exceptions
[server] log exceptions
2019-03-25 11:00:25 +01:00
Denis Rouzaud
9a6ddbd5c1 also monkey patch the former enum type 2019-03-24 21:40:33 -05:00
Denis Rouzaud
38c2d4a03d fix dox for unnested enums 2019-03-24 21:40:33 -05:00
Denis Rouzaud
f45314245c run sipify 2019-03-24 21:40:33 -05:00
Denis Rouzaud
375a0aa253 create scope based enum for QgsMapLayer::LayerType >> QgsMapLayerType
the enum is moved out of the class
this will allow forward declaration more easily since the enum is not nested in the class
2019-03-24 21:40:33 -05:00
Juergen E. Fischer
0c23e94a29 fix translation string 2019-03-23 20:53:31 +01:00
Alessandro Pasotti
b06103f140 Added missing SIP files and headers
Also fixes context evaluation before html is updated
2019-03-23 17:24:02 +01:00
Alessandro Pasotti
b165258e6d [feature][needs-docs] HTML form widget
Shameless clone of QML widget, with some webview quirks.

Funded by ARPA Piemonte
2019-03-23 16:41:16 +01:00
Juergen E. Fischer
2af3535216 [needsbackport] apply an alternative fix for #20826
Partly reverts c9e761649, which removed the synchronizatiion of
credential requests (eg. in a project that has multiple layers from the
same postgresql database without credentials) and led to multiple
concurrent requests for the same credentials.

Some of which were silently discarded, when events processed in the
dialogs exec() event loop tried to reinvoke the dialog and caused
invalid layers.

Authentications caused by network requests can still cause this.

The credential cache is now guarded by a separate mutex.
2019-03-23 16:08:25 +01:00
Blottiere Paul
b0ef62ba51 Fixes compilation 2019-03-22 12:57:28 +00:00
Blottiere Paul
096bd79565 Update sip binding 2019-03-22 12:36:52 +00:00
Nyall Dawson
fc4d9b8f78 Remove dead code 2019-03-22 15:38:11 +10:00
Harrissou Sant-anna
f998ec9bb4 Remove duplicate word 2019-03-22 12:44:27 +10:00
Nyall Dawson
427ea515a5 Deprecate some more methods 2019-03-22 12:16:22 +10:00
Nyall Dawson
16a64ed84d Deprecate some methods, dox++ 2019-03-22 12:16:22 +10:00
Nyall Dawson
fa202795b0 Dox++ 2019-03-22 12:16:22 +10:00
Víctor Olaya
e0a990d997 [processing] Add 'call' statements to SAGA batch file 2019-03-22 12:15:50 +10:00
Giovanni Manghi
10a542ebdf fixes GRASS r.mapcalc tool 2019-03-22 07:29:53 +10:00
Blottiere Paul
e9067834eb
Merge pull request #9362 from pblottiere/legend_json
Add json format for legend
2019-03-21 09:17:42 +01:00
Nyall Dawson
af06cf0cd2 [processing] Fix exception when creating unit tests 2019-03-21 16:08:42 +10:00
Nyall Dawson
c7ac86604f [FEATURE] New algorithm "Add X/Y fields to layer"
Adds X and Y (or latitude/longitude) fields to a point layer.
The X/Y fields can be calculated in a different CRS to the
layer (e.g. creating latitude/longitude fields for a layer in
a project CRS).

Sponsored by SMEC/SJ
2019-03-21 16:08:42 +10:00
Nyall Dawson
c66159bd2d [processing] Fix warning when loading algorithm dialog and no layers
are present

Fixes #21631
2019-03-21 15:10:30 +10:00
Nyall Dawson
1dc447e1f2 Dox++ 2019-03-21 12:44:16 +10:00
Rashad Kanavath
46da10a1e8 Revert "fixes #21374: ignore optional output parameters"
This reverts commit af2421541c78742a233b3c5a00cbbd6c11ceaaab.
2019-03-21 04:44:59 +10:00
Rashad Kanavath
91d430a0cb fix travis code_layout test 2019-03-21 04:44:59 +10:00
Rashad Kanavath
e94d9a596a [TEST] add more test on otb segmentation apps
Even though not all errors are caught by these new tests, it could
expose if otb is broken or if processing api is changed to adopt
optional status of parameters at run-time.

`alg.processAlgorithm()` is running and failing correctly.
But `parameter.checkValueIsAcceptable()` and `alg.checkParameterValues()`
aren't working as expected.
2019-03-21 04:44:59 +10:00
Rashad Kanavath
0b86110ccd report warnings as non fatal errors through Feedback 2019-03-21 04:44:59 +10:00
Rashad Kanavath
c763b9229b fix #21373 #21374: handle update optional status based on user-input
Parameters are marked required in descriptor file for certian
applications but they are only required if a parent parameter has a
"certain" value. So initial idea was to make all of those parameters
optional from OTB part. So that qgis can work correctly and was a easy
fix. But.. we (me and Antonie) decided not to take that route and
found a better fix.

`OtbParameterChoice` and its wrapper will update optional status of
all sub-parameters depending on the value of a choice parameter.

A test has been added to check this issue and will be available in
next commit.
2019-03-21 04:44:59 +10:00
Rashad Kanavath
f6ad4745bd fixes #21374: ignore optional output parameters 2019-03-21 04:44:59 +10:00
Rashad Kanavath
f1cc8aa108 bug: check for empty string in parameter values 2019-03-21 04:44:59 +10:00
Rashad Kanavath
d3a1c65368 Remove OtbSettings class and put constants for key names in OtbUtils 2019-03-21 04:44:59 +10:00
Rashad Kanavath
07d17a0f17 This commits fixes encoding issue on windows.
getWindowsCodePage is taken from Grass7Utils.py

Instead of writing a cli_file at startup, provider now pass all
required env_variables directly to subprocess.popen. This has known to
cause issues when handling with windows path names. subprocess.Popen
handles it correctly depending on platform

Logging of output from otbalgorithm and updating progress bar is
slightly updated.
Algoirthm is now launched directly using otbApplicationLauncherCommandLine
`encoding` (on windows) and env arguments passed to subprocess is
logged in QgsMessageLog
2019-03-21 04:44:59 +10:00
Matthias Kuhn
13a74ae962
Merge pull request #9320 from m-kuhn/geometry-validation-icons
Geometry validation icons
2019-03-20 11:58:28 +01:00
Blottiere Paul
90b46f6a38 Add context in doc 2019-03-20 09:56:30 +00:00