7397 Commits

Author SHA1 Message Date
Alessandro Pasotti
a3c4eb9947
Providers connections interface API
This is the implementation of the new DB connections API (grant proposal 2019).
Summary

The new API makes it available to QGIS core a new interface for provider connections and will allow to:

    replace the provider specific QgsSettings management in QGIS4 (save/load connections from the settings) NOT IN SCOPE FOR NOW.
    provide a unified API for common operations on DB connections:
        executeSql and get the results
        list tables names and properties and schemas
        create a new vector table (no rasters for now)
        create/rename/drop schemas and tables
        vacuum
       ....
2019-08-16 20:44:05 +02:00
Isghj5
9fd93a1013 ProcessingConfig: added multithread max thread setting, TilesXYZ: max thread now inherrrits from ProcessingConfig 2019-08-12 08:41:26 +10:00
Isghj5
ba17f3b81e TilesXYZ: removed try/except/print from atypical exception, regular raise chosen instead 2019-08-12 08:41:26 +10:00
Isghj5
6b519195da TilesXYZ: converted feedback notifications to translate 2019-08-12 08:41:26 +10:00
Isghj5
9baa6b7e51 TilesXYZ.py: core limit defined in general settings is applied to multicore render 2019-08-12 08:41:26 +10:00
Isghj5
0e48e45d21 prepare-commit changes 2019-08-12 08:41:26 +10:00
Isghj5
e6963cb6dd Processing(TilesXYZ): Added Multithreading with ThreadPoolExecutor, multicore optimization 2019-08-12 08:41:26 +10:00
Nyall Dawson
fe8b7c0c95 [processing] Always clear list of previously encountered errors on
each new algorithm execution

Avoids the situation where errors reported during an algorithm
which was overall successully executed are append to the errors
for later execution steps
2019-08-08 10:07:27 +10:00
Julien Cabieces
2cc6775354 Use context.project() instead of QgsProject.instance() and
QgsProcessingUtils generateTempFileName method
2019-08-07 21:17:05 +10:00
Julien Cabieces
36fe8e64e3 Get supported extension to avoid unavailable driver 2019-08-07 21:17:05 +10:00
Julien Cabieces
4232e67c3d fixes #24041 : Write intermediate memory layer to disk in Execute SQL
algorithm so they can be referenced by the virtual layer provider
2019-08-07 21:17:05 +10:00
Nyall Dawson
99594147b1 [processing] Fix raster layers are not shown as an option for map layer
parameters in batch mode

Fixes #30739
2019-08-07 09:58:46 +10:00
Nyall Dawson
078ab8b04e
Merge pull request #30462 from DelazJ/patch-11
Add precision to travel cost parameter in service area algorithms
2019-08-06 07:17:46 +10:00
Matthias Kuhn
549abbfb86
Merge pull request #31047 from m-kuhn/support_loading_curved_pg_types
[db_manager] support loading mixed curved and straight type tables
2019-08-05 08:39:44 +02:00
Dimitris Salmas
0a27b7b131
bug fix
Bug fix for ERROR: Output distance in meters for lat/lon is only possible with 'metric=geodesic'
2019-08-02 17:08:53 +03:00
Matthias Kuhn
bd61fa55e7 Do not specify srid in dbmanager. It goes crazy
If srid is specified in an uri, it disables type detection.

Fix #30787
2019-08-02 13:12:18 +02:00
Harrissou Sant-anna
292efc2bf8 Add minimal description to Processing algorithms
enabling the right-hand help panel
2019-08-01 09:19:08 +10:00
Harrissou Sant-anna
ad011ac0a2
Apply suggestions from code review
Typo fix

Co-Authored-By: Nyall Dawson <nyall.dawson@gmail.com>
2019-08-01 00:58:18 +02:00
Harrissou Sant-anna
7cad1e3a0a
Revert bar plot removal 2019-07-31 20:54:12 +02:00
Harrissou Sant-anna
bae77bf8c3 Add help panel to service area algorithms dialog
with information of travel cost units
2019-07-31 18:23:52 +02:00
Nyall Dawson
8ef960442d [processing] Use lists, not maps in overlap analysis algorithm
Ensures consistent field ordering and that fields are always matched
to input layer order
2019-07-26 10:21:20 +10:00
Nyall Dawson
da1b5637af Fix deprecated gdal import warnings 2019-07-25 11:25:51 +10:00
lbartoletti
81c4b81b3b [bugfix] Fix the whole text instead of the selected part in db_manager save SQL file. fixes #30616 2019-07-22 18:41:01 +10:00
Alexander Bruy
d0b8d6210c
Merge pull request #30715 from alexbruy/gdal-layers
[processing] pass layer name to the gdalwarp to avoid issues with multi-layer datasources (fix #30292)
2019-07-18 10:21:03 +03:00
luz.paz
604e66ba75 sipify_all 2019-07-16 11:29:42 +10:00
Alexander Bruy
e45b62c6af re-enable some disabled test and fix broken r.describe algorithm 2019-07-16 06:20:23 +10:00
Alexander Bruy
807564a435 [processing] improve handling of the HTML outputs in GRASS provider (fix #30609) 2019-07-16 06:20:23 +10:00
Alexander Bruy
109d1fb7a8 [processing] pass layer name to the gdalwarp to avoid issues with
multi-layer datasources (fix #30292)
2019-07-15 16:05:16 +03:00
rldhont
7362faca02 [Bugfix] DB Mananger: Fix in Oracle plugin the way to strip uniqueCol 2019-07-15 10:37:36 +02:00
Alexander Bruy
5709f84b2f [processing] add createByDefault argument to directory output
constructor
2019-07-15 08:51:01 +10:00
Alexander Bruy
9ed4d08d5b [processing] ignore hidden parameters when generating GDAL command (fix #30669) 2019-07-15 07:52:36 +10:00
Nyall Dawson
e0093e1d11 [processing] Don't abort when an algorithm step fails in batch mode
Instead, record errors and report them all at the end of the batch
process. If we abort the remaining batch steps when encountering any
error, this blocks a useful use of the batch mode and prevents users
from running a batch process over a large number of input files, some
of which may be invalid.
2019-07-15 06:35:14 +10:00
Alexander Bruy
84c530b97b [processing] make color parameter available to description-based algs 2019-07-09 06:14:48 +03:00
Nyall Dawson
ec246e3ddb [processing] Fix batch mode 'fill with parameter values' option for outputs
Fixes #30543
2019-07-09 07:20:20 +10:00
Nyall Dawson
e05572a11d Port file parameter definition widget to new APi 2019-07-08 15:07:42 +10:00
Nyall Dawson
aa8d5cd22e [processing] Fix API break which breaks some 3rd party providers (e.g. R and Javascript providers) 2019-07-08 13:26:55 +10:00
Alexander Bruy
d3091e7d64 [processing][needs-docs] allow to set tiles background (fix #30490) 2019-07-03 12:15:47 +03:00
Nyall Dawson
b8e53dc012 Add missing visual links between layout and layout item parameters in models 2019-07-01 17:01:34 +10:00
Nyall Dawson
a9788339ea Port an item type which has a parent parameter choice (layout items) for reference 2019-07-01 17:01:34 +10:00
Nyall Dawson
d83997c490 Port string parameter to new config widget 2019-07-01 17:01:34 +10:00
Nyall Dawson
477d3b1f1a Port boolean widget config dialog to new API 2019-07-01 17:01:34 +10:00
Nyall Dawson
10d6a8a122 [processing][API] Add API to QgsProcessingGuiRegistry and QgsProcessingParameterWidgetFactoryInterface
to handle creation of parameter definition widgets

Previously, these configuration widgets were all hardcoded into the Python modeler
dialog. This prevented 3rd party, plugin provided, parameters from ever being full
first class citizens in QGIS, as there was no way to allow their use as inputs to
user created models to be customised.

Now, the registry is responsible for creating the configuration widget, allowing
for 3rd party parameter types to provide their own customised configuration
widgets.

Refs #26493
2019-07-01 17:01:34 +10:00
Panos Mavrogiorgos
d8b0cdacb7 Make setting "Grass7AlgorithProvider.activateSetting" optional.
This change makes it easier to subclass `Grass7AlgorithProvider` which
allows e.g. to expose GRASS Addons as QGIS plugins.

Disclaimer: `Grass7AlgorithProvider` is a private API and it may change
            without warning. 3rd parties that rely on this should expect
            that their code will break in future releases.
            For more info please check the comments at #30252

Nevertheless, it currently is possible to subclass with something like this:

    class CustomGrassBasedProvider(Grass7AlgorithmProvider):
        # Set descriptionFolder to our own description directory
        descriptionFolder = os.path.join(os.path.dirname(__file__), 'description')

        # 3rd party plugins don't need an activation/deactivation setting
        activateSetting = None

        # define the rest of the methods that are needed (e.g. name(), id() etc)
        # ...

Fixes #30241
Continues #9202
2019-06-29 09:51:13 +10:00
Panos Mavrogiorgos
03f1ae9576 Stop hardcoding activation setting name in Grass7AlgorithmProvider 2019-06-29 09:51:13 +10:00
Juergen E. Fischer
6bdb259627 translation string fix 2019-06-27 13:58:46 +02:00
Alexander Bruy
509ab2985c
Merge pull request #30443 from alexbruy/batch-fix
use correct method name in the batch input selector for vector layers (fix #30410)
2019-06-27 14:52:11 +03:00
Martin Dobias
0a7386e6da [TilesXYZ] Add metatile size parameter
Larger values may speed up the rendering and provide better labelling (fewer gaps without labels)
at the expense of using more memory.

Ported from XYZ Tiles plugin - originally contributed by @nurenda
2019-06-27 13:37:50 +02:00
Alexander Bruy
49d0e996a7 use correct method name in the batch input selector for vector layers (fix #30410) 2019-06-27 12:38:30 +03:00
Alessandro Pasotti
7761f5f0fe
Merge pull request #30391 from troopa81/executesql_raise_unknown_geom
Raise an exception when geometry field autodetection has failed
2019-06-27 09:22:36 +02:00
Alexander Bruy
c224a01faf
Merge pull request #30377 from alexbruy/gdal-extra
[processing] allow passing additional command line parameters to GDAL algorithms
2019-06-26 19:50:43 +03:00