Skip to content
Permalink
Browse files

Merge pull request #8318 from rldhont/processing-convertformat-geopac…

…kage

[Processing] Add GeoPackage support in alg qgis:convertformat (forward)
  • Loading branch information
rldhont committed Oct 25, 2018
2 parents 221df8e + 1d246de commit 236edd272341a49042889982e0b5438cf70aaa6d
@@ -82,7 +82,7 @@ def getConsoleCommands(self, parameters, context, feedback, executing=True):

output, outputFormat = GdalUtils.ogrConnectionStringAndFormat(outFile, context)

if outputFormat == 'SQLite' and os.path.isfile(output):
if outputFormat in ('SQLite', 'GPKG') and os.path.isfile(output):
raise QgsProcessingException(self.tr('Output file "{}" already exists.'.format(output)))

arguments = []
@@ -1458,6 +1458,13 @@ def testOgr2Ogr(self):
'-f "LIBKML" "' + outdir + '/my out/check.kml" ' +
source + ' polys2'])

self.assertEqual(
alg.getConsoleCommands({'INPUT': source,
'OUTPUT': outdir + '/check.gpkg'}, context, feedback),
['ogr2ogr',
'-f "GPKG" ' + outdir + '/check.gpkg ' +
source + ' polys2'])

def testOgr2PostGis(self):
context = QgsProcessingContext()
feedback = QgsProcessingFeedback()

0 comments on commit 236edd2

Please sign in to comment.
You can’t perform that action at this time.