Dear Metashape developers,
We need to export a geometry in a GeoPackage file, but executing code:
layer = chunk.shapes.groups[0]
chunk.exportShapes(
path=os.path.join(output_path, 'roi.gpkg'),
save_polygons=True,
groups=[layer.key],
format=Metashape.ShapesFormatGeoPackage,
crs=chunk.crs
)
We get error: OSError: SQL logic error (1)
But we do not get any error using the SHP format:
layer = chunk.shapes.groups[0]
chunk.exportShapes(
path=os.path.join(output_path, 'roi.shp'),
save_polygons=True,
groups=[layer.key],
format=Metashape.ShapesFormatSHP,
crs=chunk.crs
)
Please, what is the solution to get our geometry exported in GPKG format?
Thank you for your time