mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Checks is gpkg is available for writing
This commit is contained in:
parent
9f3ed88145
commit
6918f230b8
@ -87,9 +87,13 @@ class GdalAlgorithm(QgsProcessingAlgorithm):
|
||||
if executing:
|
||||
# parameter is not a vector layer - try to convert to a source compatible with OGR
|
||||
# and extract selection if required
|
||||
if 'gpkg' in QgsVectorFileWriter.supportedFormatExtensions():
|
||||
preferred_format = 'gpkg'
|
||||
else:
|
||||
preferred_format = 'shp'
|
||||
ogr_data_path = self.parameterAsCompatibleSourceLayerPath(parameters, parameter_name, context,
|
||||
QgsVectorFileWriter.supportedFormatExtensions(),
|
||||
'gpkg',
|
||||
preferred_format,
|
||||
feedback=feedback)
|
||||
ogr_layer_name = GdalUtils.ogrLayerName(ogr_data_path)
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user