Skip to content

Commit

Permalink
added test tp check truncation of WIDTh and HEIGHT float values
Browse files Browse the repository at this point in the history
relates to #60533
  • Loading branch information
jakimowb authored and nyalldawson committed Feb 12, 2025
1 parent 81d7255 commit 1e86a6a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions python/plugins/processing/tests/GdalAlgorithmsRasterTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3506,6 +3506,30 @@ def testRasterize(self):
],
)

# truncate HEIGHT and WIDTH floats
self.assertEqual(
alg.getConsoleCommands(
{
"INPUT": source,
"FIELD": "id",
"UNITS": 0,
"WIDTH": 100.4,
"HEIGHT": 200.6,
"OUTPUT": outdir + "/check.jpg",
},
context,
feedback,
),
[
"gdal_rasterize",
"-l polys2 -a id -ts 100 200 -ot Float32 -of JPEG "
+ source
+ " "
+ outdir
+ "/check.jpg",
],
)

if GdalUtils.version() >= 3070000:
self.assertEqual(
alg.getConsoleCommands(
Expand Down

0 comments on commit 1e86a6a

Please sign in to comment.