Skip to content

Commit 5a5c1bf

Browse files
committed
test for Processing "fix geometries" algorithm
1 parent 0293bc7 commit 5a5c1bf

File tree

3 files changed

+46
-0
lines changed

3 files changed

+46
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<GMLFeatureClassList>
2+
<GMLFeatureClass>
3+
<Name>valid</Name>
4+
<ElementPath>valid</ElementPath>
5+
<!--MULTIPOLYGON-->
6+
<GeometryType>6</GeometryType>
7+
<SRSName>EPSG:4326</SRSName>
8+
<DatasetSpecificInfo>
9+
<FeatureCount>1</FeatureCount>
10+
<ExtentXMin>122.17632</ExtentXMin>
11+
<ExtentXMax>122.19038</ExtentXMax>
12+
<ExtentYMin>-8.60636</ExtentYMin>
13+
<ExtentYMax>-8.59579</ExtentYMax>
14+
</DatasetSpecificInfo>
15+
</GMLFeatureClass>
16+
</GMLFeatureClassList>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ogr:FeatureCollection
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation=""
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>122.1763203897661</gml:X><gml:Y>-8.606355050987483</gml:Y></gml:coord>
10+
<gml:coord><gml:X>122.1903768142314</gml:X><gml:Y>-8.595792419886385</gml:Y></gml:coord>
11+
</gml:Box>
12+
</gml:boundedBy>
13+
14+
<gml:featureMember>
15+
<ogr:valid fid="invalidgeometries.0">
16+
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>122.186446688291,-8.60019485107161 122.188508041037,-8.60212999854704 122.186395514816,-8.60635505098748 122.183795482545,-8.60261750459786 122.186446688291,-8.60019485107161</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>122.176320389766,-8.60123623745388 122.179976685147,-8.59774244408966 122.183895970553,-8.59830234200473 122.176320389766,-8.60123623745388</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>122.186446688291,-8.60019485107161 122.184526741622,-8.59839245215742 122.183895970553,-8.59830234200473 122.190376814231,-8.59579241988638 122.188508041037,-8.59831120114895 122.186446688291,-8.60019485107161</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
17+
</ogr:valid>
18+
</gml:featureMember>
19+
</ogr:FeatureCollection>

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

+11
Original file line numberDiff line numberDiff line change
@@ -2300,6 +2300,17 @@ tests:
23002300
name: expected/zonal_statistics.gml
23012301
type: vector
23022302

2303+
- algorithm: qgis:fixgeometries
2304+
name: Fix geometries
2305+
params:
2306+
INPUT:
2307+
name: invalidgeometries.gml
2308+
type: vector
2309+
results:
2310+
OUTPUT:
2311+
name: expected/valid.gml
2312+
type: vector
2313+
23032314
- algorithm: qgis:polygonize
23042315
name: Polygonize
23052316
params:

0 commit comments

Comments
 (0)