Skip to content
Permalink
Browse files

Merge pull request #4763 from nyalldawson/algs3

Restore more processing algs
  • Loading branch information
nyalldawson committed Jun 23, 2017
2 parents 7ed6c90 + 531e1a3 commit 2906d1f1c9a11a2772ae2d84583697ad6c8ec0eb
Showing with 614 additions and 2,207 deletions.
  1. +0 −1 .ci/travis/linux/blacklist.txt
  2. +21 −0 python/core/processing/qgsprocessingoutputs.sip
  3. +17 −0 python/core/processing/qgsprocessingparameters.sip
  4. +7 −0 python/core/qgsvectorlayerexporter.sip
  5. +1 −1 python/plugins/processing/algs/help/qgis.yaml
  6. +0 −197 python/plugins/processing/algs/qgis/BasicStatisticsNumbers.py
  7. +0 −153 python/plugins/processing/algs/qgis/BasicStatisticsStrings.py
  8. +0 −87 python/plugins/processing/algs/qgis/Centroids.py
  9. +0 −163 python/plugins/processing/algs/qgis/Clip.py
  10. +0 −178 python/plugins/processing/algs/qgis/Dissolve.py
  11. +0 −149 python/plugins/processing/algs/qgis/ExtractByAttribute.py
  12. +0 −127 python/plugins/processing/algs/qgis/ExtractByExpression.py
  13. +88 −68 python/plugins/processing/algs/qgis/ImportIntoPostGIS.py
  14. +17 −0 python/plugins/processing/algs/qgis/Merge.py
  15. +0 −99 python/plugins/processing/algs/qgis/MultipartToSingleparts.py
  16. +0 −102 python/plugins/processing/algs/qgis/PolygonCentroids.py
  17. +16 −12 python/plugins/processing/algs/qgis/PostGISExecuteSQL.py
  18. +40 −50 python/plugins/processing/algs/qgis/QGISAlgorithmProvider.py
  19. +28 −21 python/plugins/processing/algs/qgis/RandomExtract.py
  20. +38 −31 python/plugins/processing/algs/qgis/RandomExtractWithinSubsets.py
  21. +37 −34 python/plugins/processing/algs/qgis/RegularPoints.py
  22. +0 −96 python/plugins/processing/algs/qgis/ReprojectLayer.py
  23. +0 −173 python/plugins/processing/algs/qgis/SplitLinesWithLines.py
  24. +45 −30 python/plugins/processing/algs/qgis/SymmetricalDifference.py
  25. +1 −1 python/plugins/processing/algs/qgis/Union.py
  26. +0 −148 python/plugins/processing/algs/qgis/VectorGridLines.py
  27. +0 −141 python/plugins/processing/algs/qgis/VectorGridPolygons.py
  28. +45 −20 python/plugins/processing/algs/qgis/VectorSplit.py
  29. +2 −1 python/plugins/processing/gui/AlgorithmDialog.py
  30. +16 −8 python/plugins/processing/gui/DestinationSelectionPanel.py
  31. +4 −4 python/plugins/processing/gui/ParametersPanel.py
  32. +2 −2 python/plugins/processing/gui/wrappers.py
  33. +16 −17 python/plugins/processing/gui/wrappers_postgis.py
  34. +25 −20 python/plugins/processing/tests/ModelerTest.py
  35. +66 −66 python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
  36. +1 −3 python/plugins/processing/tools/vector.py
  37. +5 −0 src/core/processing/qgsprocessingoutputs.cpp
  38. +19 −0 src/core/processing/qgsprocessingoutputs.h
  39. +3 −1 src/core/processing/qgsprocessingparameters.cpp
  40. +25 −0 src/core/processing/qgsprocessingparameters.h
  41. +1 −1 src/core/processing/qgsprocessingutils.cpp
  42. +6 −2 src/core/qgsvectorlayerexporter.h
  43. +22 −0 tests/src/core/testqgsprocessing.cpp
@@ -10,7 +10,6 @@ PyQgsDBManagerGpkg

# temporary during processing refactoring
ProcessingParametersTest
ProcessingModelerTest
ProcessingGdalAlgorithmsTest

# layout tests are run on separate build
@@ -38,6 +38,8 @@ class QgsProcessingOutputDefinition
sipType = sipType_QgsProcessingOutputNumber;
else if ( sipCpp->type() == "outputString" )
sipType = sipType_QgsProcessingOutputString;
else if ( sipCpp->type() == "outputFolder" )
sipType = sipType_QgsProcessingOutputFolder;
%End
public:

@@ -206,6 +208,25 @@ class QgsProcessingOutputString : QgsProcessingOutputDefinition
virtual QString type() const;
};

class QgsProcessingOutputFolder : QgsProcessingOutputDefinition
{
%Docstring
A folder output for processing algorithms.
.. versionadded:: 3.0
%End

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

QgsProcessingOutputFolder( const QString &name, const QString &description = QString() );
%Docstring
Constructor for QgsProcessingOutputFolder.
%End

virtual QString type() const;
};



@@ -315,12 +315,29 @@ class QgsProcessingParameterDefinition
:rtype: bool
%End


QVariantMap &metadata();
%Docstring
Returns the parameter's freeform metadata. This is mostly used by parameter widget wrappers
in order to customise their appearance and behavior.
.. seealso:: setMetadata()
:rtype: QVariantMap
%End

void setMetadata( const QVariantMap &metadata );
%Docstring
Sets the parameter's freeform ``metadata``. This is mostly used by parameter widget wrappers
in order to customise their appearance and behavior.
.. seealso:: metadata()
%End

protected:






};

QFlags<QgsProcessingParameterDefinition::Flag> operator|(QgsProcessingParameterDefinition::Flag f1, QFlags<QgsProcessingParameterDefinition::Flag> f2);
@@ -124,6 +124,13 @@ class QgsVectorLayerExporter : QgsFeatureSink
Finalizes the export and closes the new created layer.
%End

bool flushBuffer();
%Docstring
Flush the buffer writing the features to the new layer.
.. versionadded:: 3.0
:rtype: bool
%End

private:
QgsVectorLayerExporter( const QgsVectorLayerExporter &rh );
};
@@ -312,7 +312,7 @@ qgis:mergelines: >
qgis:mergevectorlayers: >
This algorithm combines multiple vector layers of the same geometry type into a single one.

If attributes tables are different, the attribute table of the resulting layer will contain the attributes from both input layers.
If attributes tables are different, the attribute table of the resulting layer will contain the attributes from all input layers. New attributes will be added for the original layer name and source.

The layers will all be reprojected to match the coordinate reference system of the first input layer.

This file was deleted.

0 comments on commit 2906d1f

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