Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update tests
  • Loading branch information
nicogodet authored and nyalldawson committed Mar 29, 2023
1 parent 7ec2808 commit 28b18e0
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions python/plugins/processing/tests/GdalAlgorithmsRasterTest.py
Expand Up @@ -1922,7 +1922,7 @@ def testWarp(self):
'SOURCE_CRS': 'EPSG:3111',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with None NODATA value
Expand All @@ -1932,7 +1932,7 @@ def testWarp(self):
'SOURCE_CRS': 'EPSG:3111',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with NODATA value
Expand All @@ -1942,7 +1942,7 @@ def testWarp(self):
'SOURCE_CRS': 'EPSG:3111',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -dstnodata 9999.0 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -dstnodata 9999.0 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with "0" NODATA value
Expand All @@ -1952,7 +1952,7 @@ def testWarp(self):
'SOURCE_CRS': 'EPSG:3111',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -dstnodata 0.0 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -dstnodata 0.0 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with "0" NODATA value and custom data type
Expand All @@ -1963,7 +1963,7 @@ def testWarp(self):
'SOURCE_CRS': 'EPSG:3111',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -dstnodata 0.0 -r near -ot Float32 -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -dstnodata 0.0 -r near -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -1974,7 +1974,7 @@ def testWarp(self):
'TARGET_CRS': 'EPSG:4326',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -t_srs EPSG:4326 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -t_srs EPSG:4326 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -1986,7 +1986,7 @@ def testWarp(self):
'TARGET_CRS': custom_crs,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:20936 -t_srs EPSG:20936 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:20936 -t_srs EPSG:20936 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -1998,7 +1998,7 @@ def testWarp(self):
'TARGET_CRS': custom_crs,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
f'-s_srs "{expected_crs_string}" -t_srs "{expected_crs_string}" -r near -of JPEG ' +
f'-overwrite -s_srs "{expected_crs_string}" -t_srs "{expected_crs_string}" -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -2012,7 +2012,7 @@ def testWarp(self):
'TARGET_EXTENT_CRS': custom_crs2,
'OUTPUT': outdir + '/check.tif'}, context, feedback),
['gdalwarp',
f'-s_srs "{expected_crs_string2}" -t_srs "{expected_crs_string2}" -r near -te 18.67 45.78 18.7 45.81 -te_srs "{expected_crs_string2}" -of GTiff ' +
f'-overwrite -s_srs "{expected_crs_string2}" -t_srs "{expected_crs_string2}" -r near -te 18.67 45.78 18.7 45.81 -te_srs "{expected_crs_string2}" -of GTiff ' +
source + ' ' +
outdir + '/check.tif'])

Expand All @@ -2023,7 +2023,7 @@ def testWarp(self):
'TARGET_CRS': 'POSTGIS:3111',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -t_srs EPSG:3111 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -t_srs EPSG:3111 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -2034,7 +2034,7 @@ def testWarp(self):
'TARGET_RESOLUTION': None,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -2045,7 +2045,7 @@ def testWarp(self):
'TARGET_RESOLUTION': 10.0,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -tr 10.0 10.0 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -tr 10.0 10.0 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -2056,7 +2056,7 @@ def testWarp(self):
'TARGET_RESOLUTION': 0.0,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-s_srs EPSG:3111 -r near -of JPEG ' +
'-overwrite -s_srs EPSG:3111 -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -2066,7 +2066,7 @@ def testWarp(self):
'EXTRA': '-dstalpha',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-r near -of JPEG -dstalpha ' +
'-overwrite -r near -of JPEG -dstalpha ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -2075,7 +2075,7 @@ def testWarp(self):
'EXTRA': '-dstalpha -srcnodata -9999',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-r near -of JPEG -dstalpha -srcnodata -9999 ' +
'-overwrite -r near -of JPEG -dstalpha -srcnodata -9999 ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -2084,7 +2084,7 @@ def testWarp(self):
'EXTRA': '-dstalpha -srcnodata "-9999 -8888"',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-r near -of JPEG -dstalpha -srcnodata "-9999 -8888" ' +
'-overwrite -r near -of JPEG -dstalpha -srcnodata "-9999 -8888" ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -2093,7 +2093,7 @@ def testWarp(self):
'EXTRA': '',
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdalwarp',
'-r near -of JPEG ' +
'-overwrite -r near -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand Down

0 comments on commit 28b18e0

Please sign in to comment.