简体   繁体   English

使用ogr2​​ogr将PostGIS表转换为个人地理数据库

[英]Using ogr2ogr to convert PostGIS table to personal geodatabase

I need to convert a PostGIS table to a personal geodatabase using ogr2ogr. 我需要使用ogr2​​ogr将PostGIS表转换为个人地理数据库。 I can convert tables to a shapefile without a problem but whenever I try to convert it to .mdb using the ODBC driver, I get an error. 我可以毫无问题地将表转换为shapefile,但是每当尝试使用ODBC驱动程序将其转换为.mdb时,都会出现错误。 I have got the 64-bit GDAL version and also the 64-bit ODBC driver installed. 我已经安装了64位GDAL版本,还安装了64位ODBC驱动程序。

This is my command: 这是我的命令:

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

This is the error I get: 这是我得到的错误:

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

Am I using the right command to do this, or am I missing a driver or something? 我是在使用正确的命令来执行此操作,还是缺少驱动程序之类的东西?

You can not. 你不能。 The ODBC is currently a read-only driver and cannot create databases. ODBC当前是一个只读驱动程序,无法创建数据库。

From http://www.gdal.org/drv_odbc.html : 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. 当前,ODBC OGR驱动程序是只读的,因此OGR应用程序通常无法创建新功能,表和数据源。 This limitation may be removed in the future. 将来可能会取消此限制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM