Skip to main content
added 19 characters in body
Source Link
user2856
  • 69.6k
  • 6
  • 119
  • 203

As noted in another answer QgsVectorLayer is not and has never been part of the GDAL python bindings.

I think you want gdal.VectorTranslate().

At it's simplest, your code turns into:

from osgeo import gdal

fgdb = r"C:\GIS\data\somefilegeodatabase.gdb"
outdb = r"C:\GIS\data\testdata\OK.gpkg" #Does not need to be created in advance

gdal.VectorTranslate(outdb, fgdb)

As noted in another answer QgsVectorLayer is not part of the GDAL python bindings.

I think you want gdal.VectorTranslate().

At it's simplest, your code turns into:

from osgeo import gdal

fgdb = r"C:\GIS\data\somefilegeodatabase.gdb"
outdb = r"C:\GIS\data\testdata\OK.gpkg" #Does not need to be created in advance

gdal.VectorTranslate(outdb, fgdb)

As noted in another answer QgsVectorLayer is not and has never been part of the GDAL python bindings.

I think you want gdal.VectorTranslate().

At it's simplest, your code turns into:

from osgeo import gdal

fgdb = r"C:\GIS\data\somefilegeodatabase.gdb"
outdb = r"C:\GIS\data\testdata\OK.gpkg" #Does not need to be created in advance

gdal.VectorTranslate(outdb, fgdb)
added 236 characters in body
Source Link
user2856
  • 69.6k
  • 6
  • 119
  • 203

As noted in another answer QgsVectorLayer is not part of the GDAL python bindings.

I think you want gdal.VectorTranslate().

At it's simplest, your code turns into:

from osgeo import gdal

fgdb = r"C:\GIS\data\somefilegeodatabase.gdb"
outdb = r"C:\GIS\data\testdata\OK.gpkg" #Does not need to be created in advance

gdal.VectorTranslate(outdb, fgdb)

I think you want gdal.VectorTranslate().

At it's simplest, your code turns into:

from osgeo import gdal

fgdb = r"C:\GIS\data\somefilegeodatabase.gdb"
outdb = r"C:\GIS\data\testdata\OK.gpkg" #Does not need to be created in advance

gdal.VectorTranslate(outdb, fgdb)

As noted in another answer QgsVectorLayer is not part of the GDAL python bindings.

I think you want gdal.VectorTranslate().

At it's simplest, your code turns into:

from osgeo import gdal

fgdb = r"C:\GIS\data\somefilegeodatabase.gdb"
outdb = r"C:\GIS\data\testdata\OK.gpkg" #Does not need to be created in advance

gdal.VectorTranslate(outdb, fgdb)
Source Link
user2856
  • 69.6k
  • 6
  • 119
  • 203

I think you want gdal.VectorTranslate().

At it's simplest, your code turns into:

from osgeo import gdal

fgdb = r"C:\GIS\data\somefilegeodatabase.gdb"
outdb = r"C:\GIS\data\testdata\OK.gpkg" #Does not need to be created in advance

gdal.VectorTranslate(outdb, fgdb)