Skip to content

Commit

Permalink
[processing] fix clip by extent tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Oct 11, 2017
1 parent 97238fd commit f65de2c
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>4.294331983805669</gml:X><gml:Y>-2.02672064777328</gml:Y></gml:coord>
<gml:coord><gml:X>8.715384615384616</gml:X><gml:Y>2</gml:Y></gml:coord>
<gml:coord><gml:X>4.362348178137652</gml:X><gml:Y>-1.193522267206478</gml:Y></gml:coord>
<gml:coord><gml:X>8.698380566801621</gml:X><gml:Y>2</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:lines fid="lines.0">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6,2 8.71538461538462,2.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6,2 8.69838056680162,2.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:lines>
</gml:featureMember>
<gml:featureMember>
<ogr:lines fid="lines.3">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>4.29433198380567,1.0 5,1</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>4.36234817813765,1.0 5,1</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:lines>
</gml:featureMember>
<gml:featureMember>
<ogr:lines fid="lines.5">
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6.97327935222672,-2.02672064777328 8.71538461538462,-0.284615384615383</gml:coordinates></gml:LineString></ogr:geometryProperty>
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>7.80647773279352,-1.19352226720648 8.69838056680162,-0.301619433198379</gml:coordinates></gml:LineString></ogr:geometryProperty>
</ogr:lines>
</gml:featureMember>
<gml:featureMember>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,30 @@
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>0.9040662650602393</gml:X><gml:Y>0.6460843373493974</gml:Y></gml:coord>
<gml:coord><gml:X>4.680271084337348</gml:X><gml:Y>5.465963855421688</gml:Y></gml:coord>
<gml:coord><gml:X>0.7143072289156609</gml:X><gml:Y>1.443072289156627</gml:Y></gml:coord>
<gml:coord><gml:X>4.718222891566264</gml:X><gml:Y>5.390060240963856</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:polys2 fid="polys.0">
<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>
<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>
<ogr:name>aaaaa</ogr:name>
<ogr:intval>33</ogr:intval>
<ogr:floatval>44.123456</ogr:floatval>
</ogr:polys2>
</gml:featureMember>
<gml:featureMember>
<ogr:polys2 fid="polys.1">
<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>
<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>
<ogr:name>Aaaaa</ogr:name>
<ogr:intval>-33</ogr:intval>
<ogr:floatval>0</ogr:floatval>
</ogr:polys2>
</gml:featureMember>
<gml:featureMember>
<ogr:polys2 fid="polys.2">
<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>
<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>
<ogr:name>bbaaa</ogr:name>
<ogr:floatval>0.123</ogr:floatval>
</ogr:polys2>
Expand All @@ -42,7 +42,7 @@
</gml:featureMember>
<gml:featureMember>
<ogr:polys2 fid="polys.5">
<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>
<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>
<ogr:name>elim</ogr:name>
<ogr:intval>2</ogr:intval>
<ogr:floatval>3.33</ogr:floatval>
Expand Down
78 changes: 39 additions & 39 deletions python/plugins/processing/tests/testdata/gdal_algorithm_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -521,47 +521,47 @@ tests:
name: expected/gdal/buffer_polys_dissolve.gml
type: vector

#~ - algorithm: gdal:clipvectorbyextent
#~ name: Clip points by extent
#~ params:
#~ EXTENT: 0.6180722891566264,5.408433734939758,0.4337349397590362,2.306024096385542
#~ [EPSG:4326]
#~ INPUT:
#~ name: points.gml
#~ type: vector
#~ OPTIONS: ''
#~ results:
#~ OUTPUT:
#~ name: expected/gdal/clip_points.gml
#~ type: vector
- algorithm: gdal:clipvectorbyextent
name: Clip points by extent
params:
EXTENT: 0.6180722891566264,5.408433734939758,0.4337349397590362,2.306024096385542
[EPSG:4326]
INPUT:
name: points.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/clip_points.gml
type: vector

#~ - algorithm: gdal:clipvectorbyextent
#~ name: Clip lines by extent
#~ params:
#~ EXTENT: 4.464372469635628,8.749392712550609,-1.7716599190283402,2.972469635627531
#~ [EPSG:4326]
#~ INPUT:
#~ name: lines.gml
#~ type: vector
#~ OPTIONS: ''
#~ results:
#~ OUTPUT:
#~ name: expected/gdal/clip_lines.gml
#~ type: vector
- algorithm: gdal:clipvectorbyextent
name: Clip lines by extent
params:
EXTENT: 4.362348178137652,8.698380566801621,-1.193522267206478,3.0914979757085024
[EPSG:4326]
INPUT:
name: lines.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/clip_lines.gml
type: vector

#~ - algorithm: gdal:clipvectorbyextent
#~ name: Clip polygons by extent
#~ params:
#~ EXTENT: 0.06912650602409443,4.6043674698795165,1.253313253012048,5.295180722891566
#~ [EPSG:4326]
#~ INPUT:
#~ name: polys.gml
#~ type: vector
#~ OPTIONS: ''
#~ results:
#~ OUTPUT:
#~ name: expected/gdal/clip_polygons.gml
#~ type: vector
- algorithm: gdal:clipvectorbyextent
name: Clip polygons by extent
params:
EXTENT: 0.7143072289156609,4.718222891566264,1.4430722891566266,5.390060240963856
[EPSG:4326]
INPUT:
name: polys.gml
type: vector
OPTIONS: ''
results:
OUTPUT:
name: expected/gdal/clip_polygons.gml
type: vector

#~ - algorithm: gdal:clipvectorbypolygon
#~ name: Clip lines by polygons
Expand Down

0 comments on commit f65de2c

Please sign in to comment.