Skip to content

Commit f65de2c

Browse files
committed
[processing] fix clip by extent tests
1 parent 97238fd commit f65de2c

File tree

3 files changed

+52
-52
lines changed

3 files changed

+52
-52
lines changed

python/plugins/processing/tests/testdata/expected/gdal/clip_lines.gml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66
xmlns:gml="http://www.opengis.net/gml">
77
<gml:boundedBy>
88
<gml:Box>
9-
<gml:coord><gml:X>4.294331983805669</gml:X><gml:Y>-2.02672064777328</gml:Y></gml:coord>
10-
<gml:coord><gml:X>8.715384615384616</gml:X><gml:Y>2</gml:Y></gml:coord>
9+
<gml:coord><gml:X>4.362348178137652</gml:X><gml:Y>-1.193522267206478</gml:Y></gml:coord>
10+
<gml:coord><gml:X>8.698380566801621</gml:X><gml:Y>2</gml:Y></gml:coord>
1111
</gml:Box>
1212
</gml:boundedBy>
13-
13+
1414
<gml:featureMember>
1515
<ogr:lines fid="lines.0">
16-
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6,2 8.71538461538462,2.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
16+
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6,2 8.69838056680162,2.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
1717
</ogr:lines>
1818
</gml:featureMember>
1919
<gml:featureMember>
2020
<ogr:lines fid="lines.3">
21-
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>4.29433198380567,1.0 5,1</gml:coordinates></gml:LineString></ogr:geometryProperty>
21+
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>4.36234817813765,1.0 5,1</gml:coordinates></gml:LineString></ogr:geometryProperty>
2222
</ogr:lines>
2323
</gml:featureMember>
2424
<gml:featureMember>
2525
<ogr:lines fid="lines.5">
26-
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.97327935222672,-2.02672064777328 8.71538461538462,-0.284615384615383</gml:coordinates></gml:LineString></ogr:geometryProperty>
26+
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>7.80647773279352,-1.19352226720648 8.69838056680162,-0.301619433198379</gml:coordinates></gml:LineString></ogr:geometryProperty>
2727
</ogr:lines>
2828
</gml:featureMember>
2929
<gml:featureMember>

python/plugins/processing/tests/testdata/expected/gdal/clip_polygons.gml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,30 @@
66
xmlns:gml="http://www.opengis.net/gml">
77
<gml:boundedBy>
88
<gml:Box>
9-
<gml:coord><gml:X>0.9040662650602393</gml:X><gml:Y>0.6460843373493974</gml:Y></gml:coord>
10-
<gml:coord><gml:X>4.680271084337348</gml:X><gml:Y>5.465963855421688</gml:Y></gml:coord>
9+
<gml:coord><gml:X>0.7143072289156609</gml:X><gml:Y>1.443072289156627</gml:Y></gml:coord>
10+
<gml:coord><gml:X>4.718222891566264</gml:X><gml:Y>5.390060240963856</gml:Y></gml:coord>
1111
</gml:Box>
1212
</gml:boundedBy>
13-
13+
1414
<gml:featureMember>
1515
<ogr:polys2 fid="polys.0">
16-
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0.904066265060239,3.0 3,3 3,2 2,2 2.0,0.646084337349397 0.904066265060239,0.646084337349397 0.904066265060239,3.0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
16+
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0.714307228915661,3.0 3,3 3,2 2,2 2.0,1.44307228915663 0.714307228915661,1.44307228915663 0.714307228915661,3.0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
1717
<ogr:name>aaaaa</ogr:name>
1818
<ogr:intval>33</ogr:intval>
1919
<ogr:floatval>44.123456</ogr:floatval>
2020
</ogr:polys2>
2121
</gml:featureMember>
2222
<gml:featureMember>
2323
<ogr:polys2 fid="polys.1">
24-
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.68027108433735,4.0 4,4 4.68027108433735,4.68027108433735 4.68027108433735,4.0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
24+
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.71822289156626,4.0 4,4 4.71822289156626,4.71822289156626 4.71822289156626,4.0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
2525
<ogr:name>Aaaaa</ogr:name>
2626
<ogr:intval>-33</ogr:intval>
2727
<ogr:floatval>0</ogr:floatval>
2828
</ogr:polys2>
2929
</gml:featureMember>
3030
<gml:featureMember>
3131
<ogr:polys2 fid="polys.2">
32-
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,5 2.0,5.46596385542169 3.0,5.46596385542169 3,5 2,5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
32+
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,5 2.0,5.39006024096386 3.0,5.39006024096386 3,5 2,5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
3333
<ogr:name>bbaaa</ogr:name>
3434
<ogr:floatval>0.123</ogr:floatval>
3535
</ogr:polys2>
@@ -42,7 +42,7 @@
4242
</gml:featureMember>
4343
<gml:featureMember>
4444
<ogr:polys2 fid="polys.5">
45-
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,2 4.68027108433735,1.43990963855422 4.68027108433735,0.646084337349397 2.0,0.646084337349397 2,2 3,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
45+
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,2 4.67078313253012,1.44307228915663 2.0,1.44307228915663 2,2 3,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
4646
<ogr:name>elim</ogr:name>
4747
<ogr:intval>2</ogr:intval>
4848
<ogr:floatval>3.33</ogr:floatval>

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

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -521,47 +521,47 @@ tests:
521521
name: expected/gdal/buffer_polys_dissolve.gml
522522
type: vector
523523

524-
#~ - algorithm: gdal:clipvectorbyextent
525-
#~ name: Clip points by extent
526-
#~ params:
527-
#~ EXTENT: 0.6180722891566264,5.408433734939758,0.4337349397590362,2.306024096385542
528-
#~ [EPSG:4326]
529-
#~ INPUT:
530-
#~ name: points.gml
531-
#~ type: vector
532-
#~ OPTIONS: ''
533-
#~ results:
534-
#~ OUTPUT:
535-
#~ name: expected/gdal/clip_points.gml
536-
#~ type: vector
524+
- algorithm: gdal:clipvectorbyextent
525+
name: Clip points by extent
526+
params:
527+
EXTENT: 0.6180722891566264,5.408433734939758,0.4337349397590362,2.306024096385542
528+
[EPSG:4326]
529+
INPUT:
530+
name: points.gml
531+
type: vector
532+
OPTIONS: ''
533+
results:
534+
OUTPUT:
535+
name: expected/gdal/clip_points.gml
536+
type: vector
537537

538-
#~ - algorithm: gdal:clipvectorbyextent
539-
#~ name: Clip lines by extent
540-
#~ params:
541-
#~ EXTENT: 4.464372469635628,8.749392712550609,-1.7716599190283402,2.972469635627531
542-
#~ [EPSG:4326]
543-
#~ INPUT:
544-
#~ name: lines.gml
545-
#~ type: vector
546-
#~ OPTIONS: ''
547-
#~ results:
548-
#~ OUTPUT:
549-
#~ name: expected/gdal/clip_lines.gml
550-
#~ type: vector
538+
- algorithm: gdal:clipvectorbyextent
539+
name: Clip lines by extent
540+
params:
541+
EXTENT: 4.362348178137652,8.698380566801621,-1.193522267206478,3.0914979757085024
542+
[EPSG:4326]
543+
INPUT:
544+
name: lines.gml
545+
type: vector
546+
OPTIONS: ''
547+
results:
548+
OUTPUT:
549+
name: expected/gdal/clip_lines.gml
550+
type: vector
551551

552-
#~ - algorithm: gdal:clipvectorbyextent
553-
#~ name: Clip polygons by extent
554-
#~ params:
555-
#~ EXTENT: 0.06912650602409443,4.6043674698795165,1.253313253012048,5.295180722891566
556-
#~ [EPSG:4326]
557-
#~ INPUT:
558-
#~ name: polys.gml
559-
#~ type: vector
560-
#~ OPTIONS: ''
561-
#~ results:
562-
#~ OUTPUT:
563-
#~ name: expected/gdal/clip_polygons.gml
564-
#~ type: vector
552+
- algorithm: gdal:clipvectorbyextent
553+
name: Clip polygons by extent
554+
params:
555+
EXTENT: 0.7143072289156609,4.718222891566264,1.4430722891566266,5.390060240963856
556+
[EPSG:4326]
557+
INPUT:
558+
name: polys.gml
559+
type: vector
560+
OPTIONS: ''
561+
results:
562+
OUTPUT:
563+
name: expected/gdal/clip_polygons.gml
564+
type: vector
565565

566566
#~ - algorithm: gdal:clipvectorbypolygon
567567
#~ name: Clip lines by polygons

0 commit comments

Comments
 (0)