mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-08 00:06:51 -05:00
Raise exceptions if open options not supported by GDAL version
This commit is contained in:
parent
c0ad63cf36
commit
2d27784cee
@ -181,6 +181,9 @@ class GridAverage(GdalAlgorithm):
|
|||||||
arguments.append(output_format)
|
arguments.append(output_format)
|
||||||
|
|
||||||
if input_details.open_options:
|
if input_details.open_options:
|
||||||
|
if GdalUtils.version() < 3070000:
|
||||||
|
raise QgsProcessingException(self.tr('Open options are not supported by gdal_grid version {} (requires GDAL version 3.7 or later)'.format(GdalUtils.readableVersion())))
|
||||||
|
|
||||||
arguments.extend(input_details.open_options_as_arguments())
|
arguments.extend(input_details.open_options_as_arguments())
|
||||||
|
|
||||||
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
||||||
|
|||||||
@ -195,6 +195,9 @@ class GridDataMetrics(GdalAlgorithm):
|
|||||||
arguments.append(output_format)
|
arguments.append(output_format)
|
||||||
|
|
||||||
if input_details.open_options:
|
if input_details.open_options:
|
||||||
|
if GdalUtils.version() < 3070000:
|
||||||
|
raise QgsProcessingException(self.tr('Open options are not supported by gdal_grid version {} (requires GDAL version 3.7 or later)'.format(GdalUtils.readableVersion())))
|
||||||
|
|
||||||
arguments.extend(input_details.open_options_as_arguments())
|
arguments.extend(input_details.open_options_as_arguments())
|
||||||
|
|
||||||
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
||||||
|
|||||||
@ -204,6 +204,9 @@ class GridInverseDistance(GdalAlgorithm):
|
|||||||
arguments.append(output_format)
|
arguments.append(output_format)
|
||||||
|
|
||||||
if input_details.open_options:
|
if input_details.open_options:
|
||||||
|
if GdalUtils.version() < 3070000:
|
||||||
|
raise QgsProcessingException(self.tr('Open options are not supported by gdal_grid version {} (requires GDAL version 3.7 or later)'.format(GdalUtils.readableVersion())))
|
||||||
|
|
||||||
arguments.extend(input_details.open_options_as_arguments())
|
arguments.extend(input_details.open_options_as_arguments())
|
||||||
|
|
||||||
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
||||||
|
|||||||
@ -189,6 +189,9 @@ class GridInverseDistanceNearestNeighbor(GdalAlgorithm):
|
|||||||
arguments.append(output_format)
|
arguments.append(output_format)
|
||||||
|
|
||||||
if input_details.open_options:
|
if input_details.open_options:
|
||||||
|
if GdalUtils.version() < 3070000:
|
||||||
|
raise QgsProcessingException(self.tr('Open options are not supported by gdal_grid version {} (requires GDAL version 3.7 or later)'.format(GdalUtils.readableVersion())))
|
||||||
|
|
||||||
arguments.extend(input_details.open_options_as_arguments())
|
arguments.extend(input_details.open_options_as_arguments())
|
||||||
|
|
||||||
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
||||||
|
|||||||
@ -161,6 +161,9 @@ class GridLinear(GdalAlgorithm):
|
|||||||
arguments.append(output_format)
|
arguments.append(output_format)
|
||||||
|
|
||||||
if input_details.open_options:
|
if input_details.open_options:
|
||||||
|
if GdalUtils.version() < 3070000:
|
||||||
|
raise QgsProcessingException(self.tr('Open options are not supported by gdal_grid version {} (requires GDAL version 3.7 or later)'.format(GdalUtils.readableVersion())))
|
||||||
|
|
||||||
arguments.extend(input_details.open_options_as_arguments())
|
arguments.extend(input_details.open_options_as_arguments())
|
||||||
|
|
||||||
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
||||||
|
|||||||
@ -173,6 +173,9 @@ class GridNearestNeighbor(GdalAlgorithm):
|
|||||||
arguments.append(output_format)
|
arguments.append(output_format)
|
||||||
|
|
||||||
if input_details.open_options:
|
if input_details.open_options:
|
||||||
|
if GdalUtils.version() < 3070000:
|
||||||
|
raise QgsProcessingException(self.tr('Open options are not supported by gdal_grid version {} (requires GDAL version 3.7 or later)'.format(GdalUtils.readableVersion())))
|
||||||
|
|
||||||
arguments.extend(input_details.open_options_as_arguments())
|
arguments.extend(input_details.open_options_as_arguments())
|
||||||
|
|
||||||
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
options = self.parameterAsString(parameters, self.OPTIONS, context)
|
||||||
|
|||||||
@ -234,6 +234,11 @@ class rasterize(GdalAlgorithm):
|
|||||||
arguments.append(output_format)
|
arguments.append(output_format)
|
||||||
|
|
||||||
if input_details.open_options:
|
if input_details.open_options:
|
||||||
|
if GdalUtils.version() < 3070000:
|
||||||
|
raise QgsProcessingException(self.tr(
|
||||||
|
'Open options are not supported by gdal_rasterize version {} (requires GDAL version 3.7 or later)'.format(
|
||||||
|
GdalUtils.readableVersion())))
|
||||||
|
|
||||||
arguments.extend(input_details.open_options_as_arguments())
|
arguments.extend(input_details.open_options_as_arguments())
|
||||||
|
|
||||||
if input_details.credential_options:
|
if input_details.credential_options:
|
||||||
|
|||||||
@ -120,6 +120,11 @@ class rasterize_over(GdalAlgorithm):
|
|||||||
arguments.append(extra)
|
arguments.append(extra)
|
||||||
|
|
||||||
if input_details.open_options:
|
if input_details.open_options:
|
||||||
|
if GdalUtils.version() < 3070000:
|
||||||
|
raise QgsProcessingException(self.tr(
|
||||||
|
'Open options are not supported by gdal_rasterize version {} (requires GDAL version 3.7 or later)'.format(
|
||||||
|
GdalUtils.readableVersion())))
|
||||||
|
|
||||||
arguments.extend(input_details.open_options_as_arguments())
|
arguments.extend(input_details.open_options_as_arguments())
|
||||||
|
|
||||||
if input_details.credential_options:
|
if input_details.credential_options:
|
||||||
|
|||||||
@ -113,6 +113,11 @@ class rasterize_over_fixed_value(GdalAlgorithm):
|
|||||||
arguments.append('-add')
|
arguments.append('-add')
|
||||||
|
|
||||||
if input_details.open_options:
|
if input_details.open_options:
|
||||||
|
if GdalUtils.version() < 3070000:
|
||||||
|
raise QgsProcessingException(self.tr(
|
||||||
|
'Open options are not supported by gdal_rasterize version {} (requires GDAL version 3.7 or later)'.format(
|
||||||
|
GdalUtils.readableVersion())))
|
||||||
|
|
||||||
arguments.extend(input_details.open_options_as_arguments())
|
arguments.extend(input_details.open_options_as_arguments())
|
||||||
|
|
||||||
if input_details.credential_options:
|
if input_details.credential_options:
|
||||||
|
|||||||
@ -1030,14 +1030,15 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
|||||||
source + ' ' +
|
source + ' ' +
|
||||||
outdir + '/check.jpg'])
|
outdir + '/check.jpg'])
|
||||||
|
|
||||||
self.assertEqual(
|
if GdalUtils.version() >= 3070000:
|
||||||
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
self.assertEqual(
|
||||||
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
||||||
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
|
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
||||||
['gdal_grid',
|
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
|
||||||
'-l points -a average:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0 -ot Float32 -of JPEG -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y -z_multiply 1.5 -outsize 1754 1394 ' +
|
['gdal_grid',
|
||||||
source + ' ' +
|
'-l points -a average:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0 -ot Float32 -of JPEG -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y -z_multiply 1.5 -outsize 1754 1394 ' +
|
||||||
outdir + '/check.jpg'])
|
source + ' ' +
|
||||||
|
outdir + '/check.jpg'])
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
||||||
@ -1102,15 +1103,16 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
|||||||
source + ' ' +
|
source + ' ' +
|
||||||
outdir + '/check.tif'])
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
if GdalUtils.version() >= 3070000:
|
||||||
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
self.assertEqual(
|
||||||
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
||||||
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
||||||
['gdal_grid',
|
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
||||||
'-l points -a minimum:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0 ' +
|
['gdal_grid',
|
||||||
'-ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y -z_multiply 1.5 -outsize 1754 1394 ' +
|
'-l points -a minimum:radius1=0.0:radius2=0.0:angle=0.0:min_points=0:nodata=0.0 ' +
|
||||||
source + ' ' +
|
'-ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y -z_multiply 1.5 -outsize 1754 1394 ' +
|
||||||
outdir + '/check.tif'])
|
source + ' ' +
|
||||||
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
||||||
@ -1167,15 +1169,16 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
|||||||
source + ' ' +
|
source + ' ' +
|
||||||
outdir + '/check.tif'])
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
if GdalUtils.version() >= 3070000:
|
||||||
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
self.assertEqual(
|
||||||
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
||||||
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
||||||
['gdal_grid',
|
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
||||||
'-l points -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 ' +
|
['gdal_grid',
|
||||||
'-ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y -z_multiply 1.5 -outsize 1754 1394 ' +
|
'-l points -a invdist:power=2.0:smoothing=0.0:radius1=0.0:radius2=0.0:angle=0.0:max_points=0:min_points=0:nodata=0.0 ' +
|
||||||
source + ' ' +
|
'-ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y -z_multiply 1.5 -outsize 1754 1394 ' +
|
||||||
outdir + '/check.tif'])
|
source + ' ' +
|
||||||
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
||||||
@ -1232,15 +1235,16 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
|||||||
source + ' ' +
|
source + ' ' +
|
||||||
outdir + '/check.tif'])
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
if GdalUtils.version() >= 3070000:
|
||||||
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
self.assertEqual(
|
||||||
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
||||||
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
||||||
['gdal_grid',
|
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
||||||
'-l points -a invdistnn:power=2.0:smoothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 ' +
|
['gdal_grid',
|
||||||
'-ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y -z_multiply 1.5 -outsize 1754 1394 ' +
|
'-l points -a invdistnn:power=2.0:smoothing=0.0:radius=1.0:max_points=12:min_points=0:nodata=0.0 ' +
|
||||||
source + ' ' +
|
'-ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y -z_multiply 1.5 -outsize 1754 1394 ' +
|
||||||
outdir + '/check.tif'])
|
source + ' ' +
|
||||||
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
||||||
@ -1297,15 +1301,16 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
|||||||
source + ' ' +
|
source + ' ' +
|
||||||
outdir + '/check.tif'])
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
if GdalUtils.version() >= 3070000:
|
||||||
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
self.assertEqual(
|
||||||
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
||||||
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
||||||
['gdal_grid',
|
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
||||||
'-l points -a linear:radius=-1.0:nodata=0.0 -ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
['gdal_grid',
|
||||||
'-z_multiply 1.5 -outsize 1754 1394 ' +
|
'-l points -a linear:radius=-1.0:nodata=0.0 -ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
||||||
source + ' ' +
|
'-z_multiply 1.5 -outsize 1754 1394 ' +
|
||||||
outdir + '/check.tif'])
|
source + ' ' +
|
||||||
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
||||||
@ -1362,15 +1367,16 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
|||||||
source + ' ' +
|
source + ' ' +
|
||||||
outdir + '/check.tif'])
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
if GdalUtils.version() >= 3070000:
|
||||||
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
self.assertEqual(
|
||||||
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
||||||
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
'EXTRA': '-z_multiply 1.5 -outsize 1754 1394',
|
||||||
['gdal_grid',
|
'OUTPUT': outdir + '/check.tif'}, context, feedback),
|
||||||
'-l points -a nearest:radius1=0.0:radius2=0.0:angle=0.0:nodata=0.0 -ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
['gdal_grid',
|
||||||
'-z_multiply 1.5 -outsize 1754 1394 ' +
|
'-l points -a nearest:radius1=0.0:radius2=0.0:angle=0.0:nodata=0.0 -ot Float32 -of GTiff -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
||||||
source + ' ' +
|
'-z_multiply 1.5 -outsize 1754 1394 ' +
|
||||||
outdir + '/check.tif'])
|
source + ' ' +
|
||||||
|
outdir + '/check.tif'])
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
||||||
@ -1987,14 +1993,15 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
|||||||
source + ' ' +
|
source + ' ' +
|
||||||
outdir + '/check.jpg'])
|
outdir + '/check.jpg'])
|
||||||
|
|
||||||
self.assertEqual(
|
if GdalUtils.version() >= 3070000:
|
||||||
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
self.assertEqual(
|
||||||
'FIELD': 'id',
|
alg.getConsoleCommands({'INPUT': source + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
||||||
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
|
'FIELD': 'id',
|
||||||
['gdal_rasterize',
|
'OUTPUT': outdir + '/check.jpg'}, context, feedback),
|
||||||
'-l polys2 -a id -ts 0.0 0.0 -ot Float32 -of JPEG -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
['gdal_rasterize',
|
||||||
source + ' ' +
|
'-l polys2 -a id -ts 0.0 0.0 -ot Float32 -of JPEG -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
||||||
outdir + '/check.jpg'])
|
source + ' ' +
|
||||||
|
outdir + '/check.jpg'])
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
alg.getConsoleCommands({'INPUT': source + '|credential:X=Y|credential:Z=A',
|
||||||
@ -2040,13 +2047,14 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
|||||||
'-l polys2 -a id -i ' +
|
'-l polys2 -a id -i ' +
|
||||||
vector + ' ' + raster])
|
vector + ' ' + raster])
|
||||||
|
|
||||||
self.assertEqual(
|
if GdalUtils.version() >= 3070000:
|
||||||
alg.getConsoleCommands({'INPUT': vector + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
self.assertEqual(
|
||||||
'FIELD': 'id',
|
alg.getConsoleCommands({'INPUT': vector + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
||||||
'INPUT_RASTER': raster}, context, feedback),
|
'FIELD': 'id',
|
||||||
['gdal_rasterize',
|
'INPUT_RASTER': raster}, context, feedback),
|
||||||
'-l polys2 -a id -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
['gdal_rasterize',
|
||||||
vector + ' ' + raster])
|
'-l polys2 -a id -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
||||||
|
vector + ' ' + raster])
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
alg.getConsoleCommands({'INPUT': vector + '|credential:X=Y|credential:Z=A',
|
alg.getConsoleCommands({'INPUT': vector + '|credential:X=Y|credential:Z=A',
|
||||||
@ -2091,13 +2099,14 @@ class TestGdalRasterAlgorithms(QgisTestCase, AlgorithmsTestBase.AlgorithmsTest):
|
|||||||
'-l polys2 -burn 100.0 -i ' +
|
'-l polys2 -burn 100.0 -i ' +
|
||||||
vector + ' ' + raster])
|
vector + ' ' + raster])
|
||||||
|
|
||||||
self.assertEqual(
|
if GdalUtils.version() >= 3070000:
|
||||||
alg.getConsoleCommands({'INPUT': vector + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
self.assertEqual(
|
||||||
'BURN': 100,
|
alg.getConsoleCommands({'INPUT': vector + '|option:X_POSSIBLE_NAMES=geom_x|option:Y_POSSIBLE_NAMES=geom_y',
|
||||||
'INPUT_RASTER': raster}, context, feedback),
|
'BURN': 100,
|
||||||
['gdal_rasterize',
|
'INPUT_RASTER': raster}, context, feedback),
|
||||||
'-l polys2 -burn 100.0 -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
['gdal_rasterize',
|
||||||
vector + ' ' + raster])
|
'-l polys2 -burn 100.0 -oo X_POSSIBLE_NAMES=geom_x -oo Y_POSSIBLE_NAMES=geom_y ' +
|
||||||
|
vector + ' ' + raster])
|
||||||
|
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
alg.getConsoleCommands({'INPUT': vector + '|credential:X=Y|credential:Z=A',
|
alg.getConsoleCommands({'INPUT': vector + '|credential:X=Y|credential:Z=A',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user