Skip to content

Commit 16a6a90

Browse files
authoredApr 26, 2018
Merge pull request #6859 from wonder-sk/overlay-alg-fixes-3
Port Union algorithm to C++ and fix it
2 parents ba02a5e + 5e7719c commit 16a6a90

23 files changed

+580
-538
lines changed
 

‎python/core/processing/qgsprocessingutils.sip.in

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,21 @@ non-duplicate name.
210210
be truncated when saving to these formats.
211211
%End
212212

213+
static QList<int> fieldNamesToIndices( const QStringList &fieldNames, const QgsFields &fields );
214+
%Docstring
215+
Returns a list of field indices parsed from the given list of field names. Unknown field names are ignored.
216+
If the list of field names is empty, it is assumed that all fields are required.
217+
218+
.. versionadded:: 3.2
219+
%End
220+
221+
static QgsFields indicesToFields( const QList<int> &indices, const QgsFields &fields );
222+
%Docstring
223+
Returns a subset of fields based on the indices of desired fields.
224+
225+
.. versionadded:: 3.2
226+
%End
227+
213228
};
214229

215230
class QgsProcessingFeatureSource : QgsFeatureSource

‎python/plugins/processing/algs/help/qgis.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,10 +530,6 @@ qgis:truncatetable: >
530530

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

533-
qgis:union: >
534-
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.
535-
536-
537533
qgis:variabledistancebuffer: >
538534
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.
539535

‎python/plugins/processing/algs/qgis/QgisAlgorithmProvider.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@
137137
from .TinInterpolation import TinInterpolation
138138
from .TopoColors import TopoColor
139139
from .TruncateTable import TruncateTable
140-
from .Union import Union
141140
from .UniqueValues import UniqueValues
142141
from .VariableDistanceBuffer import VariableDistanceBuffer
143142
from .VectorSplit import VectorSplit
@@ -253,7 +252,6 @@ def getAlgs(self):
253252
TinInterpolation(),
254253
TopoColor(),
255254
TruncateTable(),
256-
Union(),
257255
UniqueValues(),
258256
VariableDistanceBuffer(),
259257
VectorSplit(),

‎python/plugins/processing/algs/qgis/Union.py

Lines changed: 0 additions & 250 deletions
This file was deleted.

‎python/plugins/processing/tests/testdata/custom/for_union.gml

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎python/plugins/processing/tests/testdata/custom/for_union.xsd

Lines changed: 0 additions & 23 deletions
This file was deleted.

‎python/plugins/processing/tests/testdata/expected/difference.gml

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.