Skip to content

Commit

Permalink
Do not expect GdalRasterAlgorithms to generate -projwin with empty re…
Browse files Browse the repository at this point in the history
…ctangle
  • Loading branch information
strk committed Oct 4, 2023
1 parent 093bb39 commit dbdb762
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/plugins/processing/tests/GdalAlgorithmsRasterTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def testClipRasterByExtent(self):
'EXTENT': extent,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_translate',
'-projwin 0.0 0.0 0.0 0.0 -of JPEG ' +
'-of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with NODATA value
Expand All @@ -330,7 +330,7 @@ def testClipRasterByExtent(self):
'NODATA': 9999,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_translate',
'-projwin 0.0 0.0 0.0 0.0 -a_nodata 9999.0 -of JPEG ' +
'-a_nodata 9999.0 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with "0" NODATA value
Expand All @@ -340,7 +340,7 @@ def testClipRasterByExtent(self):
'NODATA': 0,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_translate',
'-projwin 0.0 0.0 0.0 0.0 -a_nodata 0.0 -of JPEG ' +
'-a_nodata 0.0 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])
# with "0" NODATA value and custom data type
Expand All @@ -351,7 +351,7 @@ def testClipRasterByExtent(self):
'DATA_TYPE': 6,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_translate',
'-projwin 0.0 0.0 0.0 0.0 -a_nodata 0.0 -ot Float32 -of JPEG ' +
'-a_nodata 0.0 -ot Float32 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -363,7 +363,7 @@ def testClipRasterByExtent(self):
'DATA_TYPE': 0,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_translate',
'-projwin 0.0 0.0 0.0 0.0 -of JPEG -co COMPRESS=DEFLATE -co PREDICTOR=2 -co ZLEVEL=9 ' +
'-of JPEG -co COMPRESS=DEFLATE -co PREDICTOR=2 -co ZLEVEL=9 ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -375,7 +375,7 @@ def testClipRasterByExtent(self):
'DATA_TYPE': 0,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_translate',
'-projwin 0.0 0.0 0.0 0.0 -of JPEG -s_srs EPSG:4326 -tps -tr 0.1 0.1 ' +
'-of JPEG -s_srs EPSG:4326 -tps -tr 0.1 0.1 ' +
source + ' ' +
outdir + '/check.jpg'])

Expand All @@ -386,7 +386,7 @@ def testClipRasterByExtent(self):
'OVERCRS': True,
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
['gdal_translate',
'-projwin 0.0 0.0 0.0 0.0 -a_srs EPSG:4326 -of JPEG ' +
'-a_srs EPSG:4326 -of JPEG ' +
source + ' ' +
outdir + '/check.jpg'])

Expand Down

0 comments on commit dbdb762

Please sign in to comment.