Skip to content

Commit 519e76c

Browse files
committedSep 14, 2016
[processing] add test for gdalinfo algorithm
1 parent 2d561f5 commit 519e76c

File tree

4 files changed

+55
-1
lines changed

4 files changed

+55
-1
lines changed
 
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<pre>Driver: GTiff/GeoTIFF
2+
Files: /home/alex/devel/cpp/qgis/python/plugins/processing/tests/testdata/raster.tif
3+
Size is 16, 14
4+
Coordinate System is:
5+
PROJCS["ED50 / UTM zone 30N",
6+
GEOGCS["ED50",
7+
DATUM["European_Datum_1950",
8+
SPHEROID["International 1924",6378388,297.0000000000014,
9+
AUTHORITY["EPSG","7022"]],
10+
AUTHORITY["EPSG","6230"]],
11+
PRIMEM["Greenwich",0],
12+
UNIT["degree",0.0174532925199433],
13+
AUTHORITY["EPSG","4230"]],
14+
PROJECTION["Transverse_Mercator"],
15+
PARAMETER["latitude_of_origin",0],
16+
PARAMETER["central_meridian",-3],
17+
PARAMETER["scale_factor",0.9996],
18+
PARAMETER["false_easting",500000],
19+
PARAMETER["false_northing",0],
20+
UNIT["metre",1,
21+
AUTHORITY["EPSG","9001"]],
22+
AUTHORITY["EPSG","23030"]]
23+
Origin = (270736.067325068172067,4459029.574521748349071)
24+
Pixel Size = (10.236696404106624,-10.044151671496886)
25+
Metadata:
26+
AREA_OR_POINT=Area
27+
Image Structure Metadata:
28+
INTERLEAVE=BAND
29+
Corner Coordinates:
30+
Upper Left ( 270736.067, 4459029.575) ( 5d41'43.48"W, 40d14'58.76"N)
31+
Lower Left ( 270736.067, 4458888.956) ( 5d41'43.30"W, 40d14'54.20"N)
32+
Upper Right ( 270899.854, 4459029.575) ( 5d41'36.56"W, 40d14'58.92"N)
33+
Lower Right ( 270899.854, 4458888.956) ( 5d41'36.38"W, 40d14'54.37"N)
34+
Center ( 270817.961, 4458959.265) ( 5d41'39.93"W, 40d14'56.56"N)
35+
Band 1 Block=16x14 Type=Float32, ColorInterp=Gray
36+
NoData Value=-32768
37+
</pre>

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

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,26 @@ tests:
3737
SUMMARY_ONLY: 'True'
3838
results:
3939
OUTPUT:
40-
name: expected/gdal/layer_info.html
40+
name: expected/gdal/vector_info.html
4141
type: regex
4242
rules:
4343
- 'Extent: \(-1.000000, -3.000000\) - \(11.000000, 5.000000\)'
4444
- 'Geometry: Line String'
4545
- 'Feature Count: [6|7]' # On some platforms returns 6 instead of 7...
46+
47+
- algorithm: gdalorg:rasterinfo
48+
name: GDAL gdalinfo
49+
params:
50+
INPUT:
51+
name: raster.tif
52+
type: raster
53+
NOGCP: false
54+
NOMETADATA: false
55+
results:
56+
OUTPUT:
57+
name: expected/gdal/raster_info.html
58+
type: regex
59+
rules:
60+
- 'Origin = \(270736.067325068172067,4459029.574521748349071\)'
61+
- 'Band 1 Block=16x14 Type=Float32, ColorInterp=Gray'
62+
- ' NoData Value=-32768'

0 commit comments

Comments
 (0)
Please sign in to comment.