使用QGIS中的数据库管理导出到Geopackage的GEOPACKAGE

发布于 2025-02-11 17:18:35 字数 603 浏览 0 评论 0原文

我通过DB Manager在QGIS工作,通过运行一些空间查询。在我使用查询的新表创建新表之后,我需要将表作为新的Geopackages导出。 我已经尝试在数据库管理器内部使用“导出到向量文件”,但是我收到以下错误消息:

错误2创建数据源失败(OGR错误: sqlite3_open(/Users/xxx/documents/xxx/xxx/xxx/xxx/xxxx/xxx/new_geopackage_layer.gpkg)失败: 无法打开数据库文件)

。当我尝试保存在现有的Geopackage中时 我有一个错误说:

“ geopackage.gpkg已经存在。您要替换它吗?一个文件或 文件夹xxx更换中的文件夹已经存在 它将覆盖其当前内容。”

“错误1无法创建数据源。 /users/xxx/documents/xxx/xxx/xxx/xxx/xxxx/new_geopackage.gpkg存在 覆盖标志是错误的。”

。内部QGIS,但需要使用OGR2OGR命令将

任何帮助都非常感谢 。 谢谢

I am working in QGIS through the DB Manager by running some spatial queries. After I create new tables with the queries I need to export the tables as new geopackages.
I've tried using the Export to Vector file inside the DB Manager but I get the following error message:

Error 2 Creation of data source failed (OGR error:
sqlite3_open(/Users/xxx/Documents/xxx/xxx/xxx/xxxx/xx/new_geopackage_layer.gpkg)failed:
unable to open database file)

I've read a couple of posts and they said I needed to create an empty geopackage first and then export the table and save it inside the geopackage but that did not work either. When I try to save inside an existing geopackage
I get an error saying:

"geopackage.gpkg already exists. Do you want to replace it? A file or
folder with the same name already exists in the folder xxx Replacing
it will overwrite its current contents."

If I choose to overwrite then I get a second error message saying:

" Error 1 Unable to create the datasource.
/Users/xxx/Documents/xxx/xxx/xxx/xxx/xxxx/new_geopackage.gpkg exists
and overwrite flag is false."

All I want is to be able to run spatial queries inside QGIS and be able to export the tables created with the queries as geopackages.

It seems that as of now I won't be able to do this from inside QGIS but instead will need to use ogr2ogr command to export to any file type.

Any help would be really appreciated.
Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文