From f75d31c40ca6545f7b7a95e760ee699ef9e40d21 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Fri, 15 Jun 2018 11:09:11 +1000 Subject: [PATCH] [processing][saga] Remove duplicate polygon difference alg, add test --- .../algs/saga/description/Difference.txt | 7 +++-- .../saga/description/PolygonDifference.txt | 6 ---- .../expected/saga/polygon_difference.dbf | Bin 0 -> 83 bytes .../expected/saga/polygon_difference.mshp | 29 ++++++++++++++++++ .../expected/saga/polygon_difference.prj | 1 + .../expected/saga/polygon_difference.shp | Bin 0 -> 948 bytes .../expected/saga/polygon_difference.shx | Bin 0 -> 148 bytes .../tests/testdata/saga_algorithm_tests.yaml | 16 ++++++++++ 8 files changed, 50 insertions(+), 9 deletions(-) delete mode 100644 python/plugins/processing/algs/saga/description/PolygonDifference.txt create mode 100644 python/plugins/processing/tests/testdata/expected/saga/polygon_difference.dbf create mode 100644 python/plugins/processing/tests/testdata/expected/saga/polygon_difference.mshp create mode 100644 python/plugins/processing/tests/testdata/expected/saga/polygon_difference.prj create mode 100644 python/plugins/processing/tests/testdata/expected/saga/polygon_difference.shp create mode 100644 python/plugins/processing/tests/testdata/expected/saga/polygon_difference.shx diff --git a/python/plugins/processing/algs/saga/description/Difference.txt b/python/plugins/processing/algs/saga/description/Difference.txt index b87269833a9..1d293b5649e 100644 --- a/python/plugins/processing/algs/saga/description/Difference.txt +++ b/python/plugins/processing/algs/saga/description/Difference.txt @@ -1,6 +1,7 @@ Difference shapes_polygons -QgsProcessingParameterFeatureSource|A|Layer A|-1|None|False -QgsProcessingParameterFeatureSource|B|Layer B|-1|None|False +QgsProcessingParameterFeatureSource|A|Layer A|2|None|False +QgsProcessingParameterFeatureSource|B|Layer B|2|None|False +QgsProcessingParameterBoolean|SPLIT|Split Parts|True QgsProcessingParameterVectorDestination|RESULT|Difference -QgsProcessingParameterBoolean|SPLIT|Split Parts|True \ No newline at end of file + diff --git a/python/plugins/processing/algs/saga/description/PolygonDifference.txt b/python/plugins/processing/algs/saga/description/PolygonDifference.txt deleted file mode 100644 index f045daa45b0..00000000000 --- a/python/plugins/processing/algs/saga/description/PolygonDifference.txt +++ /dev/null @@ -1,6 +0,0 @@ -Difference -shapes_polygons -QgsProcessingParameterFeatureSource|A|Layer A|2|None|False -QgsProcessingParameterFeatureSource|B|Layer B|2|None|False -QgsProcessingParameterBoolean|SPLIT|Split Parts|True -QgsProcessingParameterVectorDestination|RESULT|Difference diff --git a/python/plugins/processing/tests/testdata/expected/saga/polygon_difference.dbf b/python/plugins/processing/tests/testdata/expected/saga/polygon_difference.dbf new file mode 100644 index 0000000000000000000000000000000000000000..b0e76e6b0bf76438fa9049fb8b5d700b81f6efd8 GIT binary patch literal 83 vcmZQBW8-IIU|?`$U + + + + + + /tmp/processing_e049cb7c46df450286b636d45e999b58/a73e875cc8f84acc9cd2f1d9229d6e48/A.shp + + + /tmp/processing_e049cb7c46df450286b636d45e999b58/b10dbbabca9c46aca3e7acaa93a0bf24/B.shp + + Difference [A]-[B] + + + + + + + id_a + + + + 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]] + + -1 + + + + diff --git a/python/plugins/processing/tests/testdata/expected/saga/polygon_difference.prj b/python/plugins/processing/tests/testdata/expected/saga/polygon_difference.prj new file mode 100644 index 00000000000..e375a0de156 --- /dev/null +++ b/python/plugins/processing/tests/testdata/expected/saga/polygon_difference.prj @@ -0,0 +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"]] \ No newline at end of file diff --git a/python/plugins/processing/tests/testdata/expected/saga/polygon_difference.shp b/python/plugins/processing/tests/testdata/expected/saga/polygon_difference.shp new file mode 100644 index 0000000000000000000000000000000000000000..20c69316ea8f35a9e01496ae9402eadd430846fe GIT binary patch literal 948 zcmZ{hOAdoD3`9f!>WT#m7Az2|=rNij^!zKrXOJSRu)r9Sw>`UFGIrQacW z;x;E|#@k5FtdpIrFIsYX-k2`;5_j5HQS|BNmpSMG)~2lsIna2_9^J=tuNQt==fJ}m zc!Rc(gBn`zg`?X;@lRL1c$ePJ-x&^ueIW-mwB8E`(R(ibOIYO~Grhr54r-wH!r2#{ H=Uw~*4VWmM literal 0 HcmV?d00001 diff --git a/python/plugins/processing/tests/testdata/expected/saga/polygon_difference.shx b/python/plugins/processing/tests/testdata/expected/saga/polygon_difference.shx new file mode 100644 index 0000000000000000000000000000000000000000..b30c69b41c90ee6a6637edb2f442b063b66b9d2d GIT binary patch literal 148 zcmZQzQ0HR64!mA4Gcd5idoeS_w+4L1~C64$=rH9stB`K