我需要使用 ogr2ogr 将 PostGIS 表转换为个人地理数据库。我可以毫无问题地将表转换为 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.
关于database - 使用ogr2ogr将PostGIS表转换为个人地理数据库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32609157/