Skip to content

Commit c85b164

Browse files
committedJun 15, 2018
[processing][saga] Remove duplicate symmetrical difference alg
and add test. Warnings: SAGA results are bad here! Use the native QGIS alg instead
1 parent f75d31c commit c85b164

8 files changed

+50
-9
lines changed
 

‎python/plugins/processing/algs/saga/description/PolygonSymmetricalDifference.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Symmetrical Difference
22
shapes_polygons
3-
QgsProcessingParameterFeatureSource|A|Layer A|-1|None|False
4-
QgsProcessingParameterFeatureSource|B|Layer B|-1|None|False
3+
QgsProcessingParameterFeatureSource|A|Layer A|2|None|False
4+
QgsProcessingParameterFeatureSource|B|Layer B|2|None|False
5+
QgsProcessingParameterBoolean|SPLIT|Split Parts|True
56
QgsProcessingParameterVectorDestination|RESULT|Symmetrical Difference
6-
QgsProcessingParameterBoolean|SPLIT|Split Parts|True
7+
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<SAGA_METADATA>
3+
<HISTORY saga-version="2.3.1">
4+
<MODULE library="shapes_polygons" id="16" name="Symmetrical Difference">
5+
<OPTION type="boolean" id="SPLIT" name="Split Parts">TRUE</OPTION>
6+
<INPUT type="shapes" id="A" name="Layer A">
7+
<FILE>/tmp/processing_5303da0b04074aa18f9aa27b64623852/07e557e1ee824d87bb81b1f30a1568be/A.shp</FILE>
8+
</INPUT>
9+
<INPUT type="shapes" id="B" name="Layer B">
10+
<FILE>/tmp/processing_5303da0b04074aa18f9aa27b64623852/e098db0548af4075a60aa2f63b7e6ee6/B.shp</FILE>
11+
</INPUT>
12+
<OUTPUT type="shapes" id="RESULT" name="Symmetrical Difference">Symmetrical Difference [A]-[B]</OUTPUT>
13+
</MODULE>
14+
</HISTORY>
15+
<SOURCE>
16+
<FILE></FILE>
17+
<DATABASE>
18+
<FIELDS>
19+
<FIELD TYPE="STRING">id_a</FIELD>
20+
<FIELD TYPE="STRING">id_b</FIELD>
21+
</FIELDS>
22+
</DATABASE>
23+
<PROJECTION>
24+
<OGC_WKT>PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]</OGC_WKT>
25+
<PROJ4></PROJ4>
26+
<EPSG>-1</EPSG>
27+
</PROJECTION>
28+
</SOURCE>
29+
<DESCRIPTION></DESCRIPTION>
30+
</SAGA_METADATA>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","3857"]]

‎python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,4 +315,19 @@ tests:
315315
name: expected/saga/polygon_difference.shp
316316
type: vector
317317

318+
# Note - SAGA results are wrong here, so really we are just testing that the algorithm runs. Use the native one instead!
319+
- algorithm: saga:symmetricaldifference
320+
name: Polygon symmetrical difference
321+
params:
322+
A:
323+
name: custom/overlay1_a.geojson
324+
type: vector
325+
B:
326+
name: custom/overlay1_b.geojson
327+
type: vector
328+
SPLIT: true
329+
results:
330+
RESULT:
331+
name: expected/saga/polygon_symmetrical_difference.shp
332+
type: vector
318333

0 commit comments

Comments
 (0)
Please sign in to comment.