使用 ogr2ogr 将 PostGIS table 转换为个人地理数据库

Using ogr2ogr to convert PostGIS table to personal geodatabase

我需要使用 ogr2ogr 将 PostGIS table 转换为个人地理数据库。我可以毫无问题地将 tables 转换为 shapefile,但每当我尝试使用 ODBC 驱动程序将其转换为 .mdb 时,我都会收到错误消息。我已经安装了 64 位 GDAL 版本和 64 位 ODBC 驱动程序。

这是我的命令:

ogr2ogr -f "ODBC" C:\users\[user]\file.mdb PG:"host=localhost user=[user] dbname=[db] password=[password]" "[tablename]"  

这是我得到的错误:

ODBC driver failed to create C:\users\[user]\file.mdb

我是否使用了正确的命令来执行此操作,或者我是否缺少驱动程序或其他东西?

你不能。 ODBC 当前是只读驱动程序,不能创建数据库。

来自http://www.gdal.org/drv_odbc.html

Currently the ODBC OGR driver is read-only, so new features, tables and datasources cannot normally be created by OGR applications. This limitation may be removed in the future.