Skip to content
Permalink
Browse files

Merge pull request #6859 from wonder-sk/overlay-alg-fixes-3

Port Union algorithm to C++ and fix it
  • Loading branch information
wonder-sk committed Apr 26, 2018
2 parents ba02a5e + 5e7719c commit 16a6a90dd740b195a1d14d7fecbd0447a30cb9da
Showing with 580 additions and 538 deletions.
  1. +15 −0 python/core/processing/qgsprocessingutils.sip.in
  2. +0 −4 python/plugins/processing/algs/help/qgis.yaml
  3. +0 −2 python/plugins/processing/algs/qgis/QgisAlgorithmProvider.py
  4. +0 −250 python/plugins/processing/algs/qgis/Union.py
  5. +0 −24 python/plugins/processing/tests/testdata/custom/for_union.gml
  6. +0 −23 python/plugins/processing/tests/testdata/custom/for_union.xsd
  7. +0 −24 python/plugins/processing/tests/testdata/expected/difference.gml
  8. +0 −46 python/plugins/processing/tests/testdata/expected/union.gml
  9. +98 −0 python/plugins/processing/tests/testdata/expected/union1.gml
  10. +10 −3 python/plugins/processing/tests/testdata/expected/{union.xsd → union1.xsd}
  11. +63 −0 python/plugins/processing/tests/testdata/expected/union3.gml
  12. +16 −2 python/plugins/processing/tests/testdata/expected/{difference.xsd → union3.xsd}
  13. +36 −28 python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
  14. +1 −0 src/analysis/CMakeLists.txt
  15. +9 −132 src/analysis/processing/qgsalgorithmintersection.cpp
  16. +97 −0 src/analysis/processing/qgsalgorithmunion.cpp
  17. +46 −0 src/analysis/processing/qgsalgorithmunion.h
  18. +2 −0 src/analysis/processing/qgsnativealgorithms.cpp
  19. +98 −0 src/analysis/processing/qgsoverlayutils.cpp
  20. +5 −0 src/analysis/processing/qgsoverlayutils.h
  21. +30 −0 src/core/processing/qgsprocessingutils.cpp
  22. +13 −0 src/core/processing/qgsprocessingutils.h
  23. +41 −0 tests/src/analysis/testqgsprocessing.cpp
@@ -210,6 +210,21 @@ non-duplicate name.
be truncated when saving to these formats.
%End

static QList<int> fieldNamesToIndices( const QStringList &fieldNames, const QgsFields &fields );
%Docstring
Returns a list of field indices parsed from the given list of field names. Unknown field names are ignored.
If the list of field names is empty, it is assumed that all fields are required.

.. versionadded:: 3.2
%End

static QgsFields indicesToFields( const QList<int> &indices, const QgsFields &fields );
%Docstring
Returns a subset of fields based on the indices of desired fields.

.. versionadded:: 3.2
%End

};

class QgsProcessingFeatureSource : QgsFeatureSource
@@ -530,10 +530,6 @@ qgis:truncatetable: >

Warning - this algorithm modifies the layer in place, and deleted features cannot be restored!

qgis:union: >
This algorithm creates a layer containing all the features from both input layers. In the case of polygon layers, separate features are created for overlapping and non-overlapping features. The attribute table of the union layer contains attribute values from the respective input layer for non-overlapping features, and attribute values from both input layers for overlapping features.


qgis:variabledistancebuffer: >
This algorithm computes a buffer area for all the features in an input layer. The size of the buffer for a given feature is defined by an attribute, so it allows different features to have different buffer sizes.

@@ -137,7 +137,6 @@
from .TinInterpolation import TinInterpolation
from .TopoColors import TopoColor
from .TruncateTable import TruncateTable
from .Union import Union
from .UniqueValues import UniqueValues
from .VariableDistanceBuffer import VariableDistanceBuffer
from .VectorSplit import VectorSplit
@@ -253,7 +252,6 @@ def getAlgs(self):
TinInterpolation(),
TopoColor(),
TruncateTable(),
Union(),
UniqueValues(),
VariableDistanceBuffer(),
VectorSplit(),

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 16a6a90

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