Skip to content

Commit d2513e0

Browse files
committed
Port Difference & Sym.Diff. to C++, cleanups and tests
1 parent 120d5b1 commit d2513e0

21 files changed

+858
-296
lines changed

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ qgis:densifygeometriesgivenaninterval: >
135135

136136
The distance is expressed in the same units used by the layer CRS.
137137

138-
qgis:difference: >
139-
This algorithm extracts features from the Input layer that fall outside, or partially overlap, features in the Difference layer. Input layer features that partially overlap the difference layer feature(s) are split along the boundary of the difference layer feature(s) and only the portions outside the difference layer features are retained.
140-
141-
Attributes are not modified.
142-
143138
qgis:dissolve: >
144139
This algorithm takes a polygon or line vector layer and combines their geometries into new geometries. One or more attributes can be specified to dissolve only geometries belonging to the same class (having the same value for the specified attributes), alternatively all geometries can be dissolved.
145140

@@ -511,10 +506,6 @@ qgis:sumlinelengths: >
511506

512507
The resulting layer has the same features as the input polygon layer, but with two additional attributes containing the length and count of the lines across each polygon. The names of these two fields can be configured in the algorithm parameters.
513508

514-
qgis:symmetricaldifference: >
515-
This algorithm creates a layer containing features from both the Input and Difference layers but with the overlapping areas between the two layers removed. The attribute table of the Symmetrical Difference layer contains attributes from both the Input and Difference layers.
516-
517-
518509
qgis:texttofloat: >
519510
This algorithm modifies the type of a given attribute in a vector layer, converting a text attribute containing numeric strings into a numeric attribute.
520511

python/plugins/processing/algs/qgis/Difference.py

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

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
from .DeleteDuplicateGeometries import DeleteDuplicateGeometries
5858
from .DensifyGeometries import DensifyGeometries
5959
from .DensifyGeometriesInterval import DensifyGeometriesInterval
60-
from .Difference import Difference
6160
from .EliminateSelection import EliminateSelection
6261
from .ExecuteSQL import ExecuteSQL
6362
from .ExportGeometryInfo import ExportGeometryInfo
@@ -134,7 +133,6 @@
134133
from .SpatialJoinSummary import SpatialJoinSummary
135134
from .StatisticsByCategories import StatisticsByCategories
136135
from .SumLines import SumLines
137-
from .SymmetricalDifference import SymmetricalDifference
138136
from .TextToFloat import TextToFloat
139137
from .TinInterpolation import TinInterpolation
140138
from .TopoColors import TopoColor
@@ -175,7 +173,6 @@ def getAlgs(self):
175173
DeleteDuplicateGeometries(),
176174
DensifyGeometries(),
177175
DensifyGeometriesInterval(),
178-
Difference(),
179176
EliminateSelection(),
180177
ExecuteSQL(),
181178
ExportGeometryInfo(),
@@ -252,7 +249,6 @@ def getAlgs(self):
252249
SpatialJoinSummary(),
253250
StatisticsByCategories(),
254251
SumLines(),
255-
SymmetricalDifference(),
256252
TextToFloat(),
257253
TinInterpolation(),
258254
TopoColor(),

python/plugins/processing/algs/qgis/SymmetricalDifference.py

Lines changed: 0 additions & 162 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ogr:FeatureCollection
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://ogr.maptools.org/ difference1_a_b.xsd"
5+
xmlns:ogr="http://ogr.maptools.org/"
6+
xmlns:gml="http://www.opengis.net/gml">
7+
<gml:boundedBy>
8+
<gml:Box>
9+
<gml:coord><gml:X>1</gml:X><gml:Y>3</gml:Y></gml:coord>
10+
<gml:coord><gml:X>9</gml:X><gml:Y>11</gml:Y></gml:coord>
11+
</gml:Box>
12+
</gml:boundedBy>
13+
14+
<gml:featureMember>
15+
<ogr:difference1_a_b fid="difference1_a_b.0">
16+
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,5 2,3 1,3 1,5 2,5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1,6 1,11 8,11 8,10 2,10 2,6 1,6</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
17+
<ogr:id_a>A1</ogr:id_a>
18+
</ogr:difference1_a_b>
19+
</gml:featureMember>
20+
<gml:featureMember>
21+
<ogr:difference1_a_b fid="difference1_a_b.1">
22+
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,3 3,4 4,4 4,3 3,3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
23+
<ogr:id_a>A4</ogr:id_a>
24+
</ogr:difference1_a_b>
25+
</gml:featureMember>
26+
<gml:featureMember>
27+
<ogr:difference1_a_b fid="difference1_a_b.2">
28+
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,6 6,6 6,5 4,5 4,6</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
29+
<ogr:id_a>A2</ogr:id_a>
30+
</ogr:difference1_a_b>
31+
</gml:featureMember>
32+
<gml:featureMember>
33+
<ogr:difference1_a_b fid="difference1_a_b.3">
34+
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>7,7 6,7 6,8 7,8 7,7</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>8,8 9,8 9,7 8,7 8,8</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
35+
<ogr:id_a>A3</ogr:id_a>
36+
</ogr:difference1_a_b>
37+
</gml:featureMember>
38+
</ogr:FeatureCollection>

0 commit comments

Comments
 (0)