Skip to content

Commit

Permalink
Checks is gpkg is available for writing
Browse files Browse the repository at this point in the history
  • Loading branch information
SrNetoChan authored and nyalldawson committed Oct 6, 2019
1 parent 9f3ed88 commit 6918f23
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/plugins/processing/algs/gdal/GdalAlgorithm.py
Expand Up @@ -87,9 +87,13 @@ def getOgrCompatibleSource(self, parameter_name, parameters, context, feedback,
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:
Expand Down

0 comments on commit 6918f23

Please sign in to comment.