Skip to content

Commit 0a2c856

Browse files
committed
[processing][saga] Remove duplicate polygon self intersection alg, fix params and add test
1 parent dd9e46f commit 0a2c856

8 files changed

+43
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
Polygon Self-Intersection
22
shapes_polygons
3-
QgsProcessingParameterFeatureSource|POLYGONS|Polygons|-1|None|False
4-
QgsProcessingParameterFeatureSource|ID|Identifier|5|None|False
5-
QgsProcessingParameterVectorDestination|INTERSECT|Intersection
3+
QgsProcessingParameterFeatureSource|POLYGONS|Polygons|2|None|False
4+
QgsProcessingParameterField|ID|Identifier|None|POLYGONS|-1|False|True
5+
QgsProcessingParameterVectorDestination|INTERSECT|Intersection

python/plugins/processing/algs/saga/description/PolygonSelfIntersection.txt

-5
This file was deleted.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<SAGA_METADATA>
3+
<HISTORY saga-version="2.3.1">
4+
<MODULE library="shapes_polygons" id="12" name="Polygon Self-Intersection">
5+
<OPTION type="table_field" id="ID" name="Identifier" index="-1">&lt;not set&gt;</OPTION>
6+
<INPUT type="shapes" id="POLYGONS" name="Polygons">
7+
<FILE>/tmp/processing_8acf43932cd84783ae0090b3989dbd5b/703e941d2820467086c0ad7c06adc266/POLYGONS.shp</FILE>
8+
</INPUT>
9+
<OUTPUT type="shapes" id="INTERSECT" name="Intersection">POLYGONS [self-intersection]</OUTPUT>
10+
</MODULE>
11+
</HISTORY>
12+
<SOURCE>
13+
<FILE></FILE>
14+
<DATABASE>
15+
<FIELDS>
16+
<FIELD TYPE="STRING">id_b</FIELD>
17+
<FIELD TYPE="STRING">ID</FIELD>
18+
</FIELDS>
19+
</DATABASE>
20+
<PROJECTION>
21+
<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>
22+
<PROJ4></PROJ4>
23+
<EPSG>-1</EPSG>
24+
</PROJECTION>
25+
</SOURCE>
26+
<DESCRIPTION></DESCRIPTION>
27+
</SAGA_METADATA>
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"]]
Binary file not shown.
Binary file not shown.

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

+12
Original file line numberDiff line numberDiff line change
@@ -346,3 +346,15 @@ tests:
346346
name: expected/saga/polygon_intersect.shp
347347
type: vector
348348

349+
350+
- algorithm: saga:polygonselfintersection
351+
name: Polygon self intersection
352+
params:
353+
POLYGONS:
354+
name: custom/overlay2_b.geojson
355+
type: vector
356+
results:
357+
INTERSECT:
358+
name: expected/saga/polygon_self_intersection.shp
359+
type: vector
360+

0 commit comments

Comments
 (0)