Skip to content
Permalink
Browse files

Merge branch 'master' into geomCheckerCodingConventions

  • Loading branch information
m-kuhn committed Aug 21, 2018
2 parents 37d0b7b + c0032f1 commit 50acde03be01ad6b56a49c72c1975109e8a5d8c2
Showing with 1,984 additions and 409 deletions.
  1. +9 −1 ms-windows/osgeo4w/package.cmd
  2. +0 −9 ms-windows/osgeo4w/qgis.reg.tmpl
  3. +3 −2 python/console/console_output.py
  4. +2 −0 python/core/auto_generated/layout/qgslayoutitemregistry.sip.in
  5. +12 −0 python/core/auto_generated/mesh/qgsmeshdataprovider.sip.in
  6. +13 −0 python/core/auto_generated/mesh/qgsmeshrenderersettings.sip.in
  7. +30 −2 python/core/auto_generated/qgsfeaturerequest.sip.in
  8. +30 −0 python/core/auto_generated/qgsproxyprogresstask.sip.in
  9. +4 −3 python/gui/auto_generated/qgsabstractdatasourcewidget.sip.in
  10. +9 −1 python/plugins/processing/algs/gdal/OgrToPostGis.py
  11. +9 −1 python/plugins/processing/algs/gdal/ogr2ogrtopostgislist.py
  12. +2 −2 python/plugins/processing/algs/gdal/ogrinfo.py
  13. +7 −1 python/plugins/processing/algs/qgis/ImportIntoPostGIS.py
  14. +7 −1 python/plugins/processing/algs/qgis/ImportIntoSpatialite.py
  15. +7 −1 python/plugins/processing/algs/qgis/PostGISExecuteAndLoadSQL.py
  16. +7 −1 python/plugins/processing/algs/qgis/PostGISExecuteSQL.py
  17. +48 −13 python/plugins/processing/algs/qgis/SpatialJoin.py
  18. +3 −0 python/plugins/processing/algs/qgis/SpatialiteExecuteSQL.py
  19. +0 −8 python/plugins/processing/core/Processing.py
  20. +0 −16 python/plugins/processing/core/ProcessingConfig.py
  21. +12 −1 python/plugins/processing/gui/DestinationSelectionPanel.py
  22. +106 −0 python/plugins/processing/tests/GdalAlgorithmsTest.py
  23. +125 −0 python/plugins/processing/tests/GuiTest.py
  24. +70 −0 python/plugins/processing/tests/testdata/expected/join_attribute_table_unjoinable.gml
  25. +37 −0 python/plugins/processing/tests/testdata/expected/join_attribute_table_unjoinable.xsd
  26. +35 −0 python/plugins/processing/tests/testdata/expected/join_by_location_unjoinable.gml
  27. +37 −0 python/plugins/processing/tests/testdata/expected/join_by_location_unjoinable.xsd
  28. +77 −0 python/plugins/processing/tests/testdata/filename with spaces.gml
  29. +37 −0 python/plugins/processing/tests/testdata/filename with spaces.xsd
  30. +38 −0 python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
  31. +13 −0 resources/function_help/json/generate_series
  32. +3 −0 src/3d/CMakeLists.txt
  33. +68 −0 src/3d/qgslayoutitem3dmap.cpp
  34. +94 −0 src/3d/qgslayoutitem3dmap.h
  35. +1 −1 src/analysis/CMakeLists.txt
  36. +53 −14 src/analysis/processing/qgsalgorithmjoinbyattribute.cpp
  37. +2 −2 src/analysis/processing/qgsalgorithmsaveselectedfeatures.cpp
  38. +20 −27 src/analysis/vector/geometry_checker/qgsfeaturepool.cpp
  39. +6 −20 src/analysis/vector/geometry_checker/qgsfeaturepool.h
  40. +19 −28 src/analysis/vector/geometry_checker/qgsgeometrygapcheck.cpp
  41. +3 −2 src/app/mesh/qgsmeshrendererscalarsettingswidget.cpp
  42. +22 −2 src/app/pluginmanager/qgspluginmanager.cpp
  43. +67 −127 src/app/qgisapp.cpp
  44. +9 −17 src/app/qgisapp.h
  45. +10 −2 src/app/qgsmaptoolidentifyaction.cpp
  46. +3 −2 src/app/qgsprojectproperties.cpp
  47. +27 −2 src/core/expression/qgsexpressionfunction.cpp
  48. +1 −0 src/core/layout/qgslayoutitem.h
  49. +2 −0 src/core/layout/qgslayoutitemregistry.h
  50. +12 −0 src/core/mesh/qgsmeshdataprovider.h
  51. +31 −19 src/core/mesh/qgsmeshlayer.cpp
  52. +11 −6 src/core/mesh/qgsmeshlayerinterpolator.cpp
  53. +2 −0 src/core/mesh/qgsmeshlayerinterpolator.h
  54. +14 −4 src/core/mesh/qgsmeshlayerrenderer.cpp
  55. +2 −1 src/core/mesh/qgsmeshlayerrenderer.h
  56. +7 −0 src/core/mesh/qgsmeshmemorydataprovider.cpp
  57. +1 −0 src/core/mesh/qgsmeshmemorydataprovider.h
  58. +10 −0 src/core/mesh/qgsmeshrenderersettings.cpp
  59. +9 −0 src/core/mesh/qgsmeshrenderersettings.h
  60. +1 −0 src/core/qgsapplication.cpp
  61. +14 −3 src/core/qgsfeaturerequest.cpp
  62. +25 −3 src/core/qgsfeaturerequest.h
  63. +1 −0 src/core/qgsmaplayer.h
  64. +2 −1 src/core/qgsproject.cpp
  65. +20 −0 src/core/qgsproxyprogresstask.cpp
  66. +31 −0 src/core/qgsproxyprogresstask.h
  67. +26 −0 src/core/symbology/qgsrulebasedrenderer.cpp
  68. +6 −0 src/crashhandler/qgscrashdialog.cpp
  69. +1 −0 src/crashhandler/qgscrashdialog.h
  70. +6 −3 src/gui/qgsabstractdatasourcewidget.h
  71. +0 −2 src/gui/qgsdatasourcemanagerdialog.cpp
  72. +1 −2 src/gui/qgsdatasourcemanagerdialog.h
  73. +1 −1 src/gui/raster/qgscolorrampshaderwidget.cpp
  74. +1 −12 src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp
  75. +0 −1 src/gui/raster/qgssinglebandpseudocolorrendererwidget.h
  76. +2 −2 src/native/CMakeLists.txt
  77. +1 −1 src/plugins/geometry_checker/qgsgeometrycheckersetuptab.cpp
  78. +12 −6 src/plugins/geometry_checker/qgsgeometrycheckfactory.cpp
  79. +2 −2 src/plugins/grass/qtermwidget/tools.cpp
  80. +13 −0 src/providers/mdal/qgsmdalprovider.cpp
  81. +1 −0 src/providers/mdal/qgsmdalprovider.h
  82. +2 −2 src/providers/ogr/qgsogrfeatureiterator.cpp
  83. +11 −2 src/providers/oracle/qgsoracledataitems.cpp
  84. +2 −0 src/providers/oracle/qgsoracledataitems.h
  85. +1 −1 src/providers/oracle/qgsoraclefeatureiterator.cpp
  86. +12 −2 src/providers/oracle/qgsoraclesourceselect.cpp
  87. +2 −2 src/providers/oracle/qgsoraclesourceselect.h
  88. +9 −1 src/providers/postgres/qgspgsourceselect.cpp
  89. +3 −0 src/providers/postgres/qgspgsourceselect.h
  90. +1 −1 src/providers/postgres/qgspostgresfeatureiterator.cpp
  91. +1 −1 src/providers/spatialite/qgsspatialitefeatureiterator.cpp
  92. +17 −0 src/providers/wfs/qgswfsfeatureiterator.cpp
  93. +2 −0 src/providers/wfs/qgswfsfeatureiterator.h
  94. +3 −1 src/quickgui/plugin/editor/qgsquicktextedit.qml
  95. +6 −0 src/quickgui/qgsquickidentifykit.cpp
  96. +39 −4 src/quickgui/qgsquickidentifykit.h
  97. +1 −1 src/ui/mesh/qgsmeshrendererscalarsettingswidgetbase.ui
  98. +1 −0 tests/src/3d/CMakeLists.txt
  99. +130 −0 tests/src/3d/testqgslayout3dmap.cpp
  100. +1 −0 tests/src/core/CMakeLists.txt
  101. +17 −0 tests/src/core/testqgsexpression.cpp
  102. +44 −0 tests/src/core/testqgsmeshlayer.cpp
  103. +41 −12 tests/src/core/testqgsmeshlayerrenderer.cpp
  104. +36 −0 tests/src/core/testqgsrulebasedrenderer.cpp
  105. +111 −0 tests/src/core/testqgssqliteexpressioncompiler.cpp
  106. +1 −1 tests/src/python/test_provider_postgres.py
  107. BIN tests/testdata/control_images/composer_3d/expected_composer3d_basic/expected_composer3d_basic.png
  108. BIN ...ataset_with_inactive_face/expected_quad_and_triangle_vertex_scalar_dataset_with_inactive_face.png
  109. +25 −0 tests/testdata/mesh/quad_and_triangle_vertex_scalar_with_inactive_face.dat
@@ -150,7 +150,10 @@ cmake -G "%CMAKEGEN%" ^
-D WITH_GLOBE=FALSE ^
-D WITH_ORACLE=TRUE ^
-D WITH_CUSTOM_WIDGETS=TRUE ^
-D CMAKE_CXX_FLAGS_RELEASE="/MD /MP /O2 /Ob2 /D NDEBUG" ^
-D CMAKE_CXX_FLAGS_RELEASE="/MD /Zi /MP /O2 /Ob2 /D NDEBUG" ^
-D CMAKE_SHARED_LINKER_FLAGS_RELEASE="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF" ^
-D CMAKE_MODULE_LINKER_FLAGS_RELEASE="/INCREMENTAL:NO /DEBUG /OPT:REF /OPT:ICF" ^
-D CMAKE_PDB_OUTPUT_DIRECTORY_RELEASE=%BUILDDIR%\apps\%PACKAGENAME%\pdb ^
-D CMAKE_BUILD_TYPE=%BUILDCONF% ^
-D CMAKE_CONFIGURATION_TYPES=%BUILDCONF% ^
-D GEOS_LIBRARY=%O4W_ROOT%/lib/geos_c.lib ^
@@ -407,6 +410,11 @@ if not exist %ARCH%\release\qgis\%PACKAGENAME% mkdir %ARCH%\release\qgis\%PACKAG
"etc/preremove/%PACKAGENAME%.bat"
if errorlevel 1 (echo tar desktop failed & goto error)

if not exist %ARCH%\release\qgis\%PACKAGENAME%-pdb mkdir %ARCH%\release\qgis\%PACKAGENAME%-pdb
%TAR% -C %BUILDDIR% -cjf %ARCH%/release/qgis/%PACKAGENAME%-pdb/%PACKAGENAME%-pdb-%VERSION%-%PACKAGE%.tar.bz2 ^
apps/%PACKAGENAME%/pdb
if errorlevel 1 (echo tar failed & goto error)

%TAR% -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%-grass-plugin-common/%PACKAGENAME%-grass-plugin-common-%VERSION%-%PACKAGE%.tar.bz2 ^
--exclude-from exclude ^
--exclude "*.pyc" ^
@@ -20,15 +20,6 @@ Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\.qgz]
@="QGIS Project"

[HKEY_CLASSES_ROOT\QGIS Layer Definition]
@="QGIS Layer Definition"

[HKEY_CLASSES_ROOT\QGIS Layer Definition\DefaultIcon]
@="@osgeo4w@\\apps\\@package@\\icons\\qgis-qml.ico"

[HKEY_CLASSES_ROOT\.qml]
@="QGIS Layer Definition"

[HKEY_CLASSES_ROOT\QGIS Composer Template]
@="QGIS Composer Template"

@@ -169,8 +169,9 @@ def __init__(self, parent=None):

def insertInitText(self):
txtInit = QCoreApplication.translate("PythonConsole",
"Python Console \n"
"Use iface to access QGIS API interface or Type help(iface) for more info")
"Python Console\n"
"Use iface to access QGIS API interface or Type help(iface) for more info\n"
"Security warning: typing commands from an untrusted source can lead to data loss and/or leak")

# some translation string for the console header ends without '\n'
# and the first command in console will be appended at the header text.
@@ -178,6 +178,8 @@ of layout items.
LayoutAttributeTable,
LayoutTextTable,

Layout3DMap,

// item
PluginItem,
};
@@ -359,6 +359,18 @@ Returns dataset metadata
Returns vector/scalar value associated with the index from the dataset

See QgsMeshDatasetMetadata.isVector() to check if the returned value is vector or scalar
%End

virtual bool isFaceActive( QgsMeshDatasetIndex index, int faceIndex ) const = 0;
%Docstring
Returns whether the face is active for particular dataset

For example to represent the situation when F1 and F3 are flooded, but F2 is dry,
some solvers store water depth on vertices V1-V8 (all non-zero values) and
set active flag for F2 to false.
V1 ---- V2 ---- V5-----V7
| F1 | F2 | F3 |
V3 ---- V4 ---- V6-----V8
%End
};

@@ -90,6 +90,19 @@ Returns color ramp shader function
void setColorRampShader( const QgsColorRampShader &shader );
%Docstring
Sets color ramp shader function
%End

double classificationMinimum() const;
%Docstring
Returns min value used for creation of the color ramp shader
%End
double classificationMaximum() const;
%Docstring
Returns max value used for creation of the color ramp shader
%End
void setClassificationMinimumMaximum( double minimum, double maximum );
%Docstring
Sets min/max values used for creation of the color ramp shader
%End

QDomElement writeXml( QDomDocument &doc ) const;
@@ -635,7 +635,7 @@ Check if a feature is accepted by this requests filter
.. versionadded:: 2.1
%End

int connectionTimeout() const;
int connectionTimeout() const /Deprecated/;
%Docstring
Returns the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool
at this moment. A negative value (which is set by default) will wait forever.
@@ -644,10 +644,12 @@ at this moment. A negative value (which is set by default) will wait forever.

Only works if the provider supports this option.

.. deprecated:: Use timeout() instead.

.. versionadded:: 3.0
%End

QgsFeatureRequest &setConnectionTimeout( int connectionTimeout );
QgsFeatureRequest &setConnectionTimeout( int connectionTimeout ) /Deprecated/;
%Docstring
Sets the timeout (in milliseconds) for how long we should wait for a connection if none is available from the pool
at this moment. A negative value (which is set by default) will wait forever.
@@ -656,7 +658,33 @@ at this moment. A negative value (which is set by default) will wait forever.

Only works if the provider supports this option.

.. deprecated:: Use setTimeout() instead.

.. versionadded:: 3.0
%End

int timeout() const;
%Docstring
Returns the timeout (in milliseconds) for the maximum time we should wait during feature requests before a
feature is returned. A negative value (which is set by default) will wait forever.

.. note::

Only works if the provider supports this option.

.. versionadded:: 3.4
%End

QgsFeatureRequest &setTimeout( int timeout );
%Docstring
Sets the ``timeout`` (in milliseconds) for the maximum time we should wait during feature requests before a
feature is returned. A negative value (which is set by default) will wait forever.

.. note::

Only works if the provider supports this option.

.. versionadded:: 3.4
%End

bool requestMayBeNested() const;
@@ -52,6 +52,36 @@ This method is safe to call from the main thread.

};

class QgsScopedProxyProgressTask
{
%Docstring

Scoped :py:class:`QgsScopedProxyProgressTask`, which automatically adds the proxy task
to the application task manager on construction and finalizes the task
when it goes out of scope.

.. versionadded:: 3.4
%End

%TypeHeaderCode
#include "qgsproxyprogresstask.h"
%End
public:

QgsScopedProxyProgressTask( const QString &description );
%Docstring
Constructor for QgsScopedProxyProgressTask, with the specified ``description``.
%End

~QgsScopedProxyProgressTask();

void setProgress( double progress );
%Docstring
Sets the ``progress`` (from 0 to 100) for the proxied operation.
%End

};

/************************************************************************
* This file has been generated automatically from *
* *
@@ -102,10 +102,11 @@ Emitted when a layer needs to be replaced
:param provider: key
%End


void progress( int, int );
void progress( int, int ) /Deprecated/;
%Docstring
Emitted when a progress dialog is shown by the provider dialog
Emitted when a progress dialog is shown by the provider dialog.

.. deprecated:: Since QGIS 3.4 this signal is no longer used. Use QgsProxyProgressTask instead to show progress reports.
%End

void progressMessage( QString message );
@@ -163,7 +163,15 @@ def name(self):
return 'importvectorintopostgisdatabasenewconnection'

def displayName(self):
return self.tr('Import vector into PostGIS database (new connection)')
return self.tr('Export to PostgreSQL (new connection)')

def shortDescription(self):
return self.tr('Exports a vector layer to a new PostgreSQL database connection')

def tags(self):
t = self.tr('import,into,postgis,database,vector').split(',')
t.extend(super().tags())
return t

def group(self):
return self.tr('Vector miscellaneous')
@@ -171,7 +171,15 @@ def name(self):
return 'importvectorintopostgisdatabaseavailableconnections'

def displayName(self):
return self.tr('Import vector into PostGIS database (available connections)')
return self.tr('Export to PostgreSQL (available connections)')

def shortDescription(self):
return self.tr('Exports a vector layer to an existing PostgreSQL database connection')

def tags(self):
t = self.tr('import,into,postgis,database,vector').split(',')
t.extend(super().tags())
return t

def group(self):
return self.tr('Vector miscellaneous')
@@ -74,7 +74,7 @@ def commandName(self):
return 'ogrinfo'

def getConsoleCommands(self, parameters, context, feedback, executing=True):
arguments = [self.commandName(), '-al']
arguments = ['-al']

if self.parameterAsBool(parameters, self.SUMMARY_ONLY, context):
arguments.append('-so')
@@ -87,7 +87,7 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):

connectionString = GdalUtils.ogrConnectionString(inLayer.source(), context)
arguments.append(connectionString)
return arguments
return [self.commandName(), GdalUtils.escapeAndJoin(arguments)]

def processAlgorithm(self, parameters, context, feedback):
GdalUtils.runGdal(self.getConsoleCommands(parameters, context, feedback), feedback)
@@ -115,7 +115,13 @@ def name(self):
return 'importintopostgis'

def displayName(self):
return self.tr('Import into PostGIS')
return self.tr('Export to PostgreSQL')

def shortDescription(self):
return self.tr('Exports a vector layer to a PostgreSQL database')

def tags(self):
return self.tr('import,postgis,table,layer,into,copy').split(',')

def processAlgorithm(self, parameters, context, feedback):
connection = self.parameterAsString(parameters, self.DATABASE, context)
@@ -84,7 +84,13 @@ def name(self):
return 'importintospatialite'

def displayName(self):
return self.tr('Import into Spatialite')
return self.tr('Export to SpatiaLite')

def shortDescription(self):
return self.tr('Exports a vector layer to a SpatiaLite database')

def tags(self):
return self.tr('import,table,layer,into,copy').split(',')

def processAlgorithm(self, parameters, context, feedback):
database = self.parameterAsVectorLayer(parameters, self.DATABASE, context)
@@ -89,7 +89,13 @@ def name(self):
return 'postgisexecuteandloadsql'

def displayName(self):
return self.tr('PostGIS execute and load SQL')
return self.tr('PostgreSQL execute and load SQL')

def shortDescription(self):
return self.tr('Executes a SQL command on a PostgreSQL database and loads the result as a table')

def tags(self):
return self.tr('postgis,table,database').split(',')

def processAlgorithm(self, parameters, context, feedback):
connection = self.parameterAsString(parameters, self.DATABASE, context)
@@ -58,7 +58,13 @@ def name(self):
return 'postgisexecutesql'

def displayName(self):
return self.tr('PostGIS execute SQL')
return self.tr('PostgreSQL execute SQL')

def shortDescription(self):
return self.tr('Executes a SQL command on a PostgreSQL database')

def tags(self):
return self.tr('postgis,database').split(',')

def processAlgorithm(self, parameters, context, feedback):
connection = self.parameterAsString(parameters, self.DATABASE, context)

0 comments on commit 50acde0

Please sign in to comment.
You can’t perform that action at this time.