mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
added test tp check truncation of WIDTh and HEIGHT float values
relates to #60533
This commit is contained in:
parent
401f6d3844
commit
8054fd816f
@ -3506,6 +3506,30 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
||||
],
|
||||
)
|
||||
|
||||
# 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(
|
||||
|
Loading…
x
Reference in New Issue
Block a user