I try to use qgis:creategrid
processing tool. I want to give as output source gpkg layer which I have already create by defining it shape type, crs. However it does not work for me now. Here is my code:
parameters = {'TYPE': 2,
'EXTENT': '%f,%f,%f,%f' % (xmin, xmax, ymin, ymax),
'HSPACING': dx,
'VSPACING': dy,
'HOVERLAY': 0.0,
'VOVERLAY': 0.0,
'CRS': str(epsg),
'OUTPUT': self.gpkgFile + "|layername=Grid_1"}
processing.run('qgis:creategrid', parameters)
self.gpkgFile
is defined the gpkg source such as: D:\newProject\project1.gpkg
So 'OUTPUT'
describes here: D:\newProject\project1.gpkg|layername=Grid_1
How can I use gpkg layer as 'OUTPUT'
in such kind of processing tools?