我使用osm2psql使用以下命令导入一个OSM文件转换为postgres数据库:错误在导入OSM文件到Postgres数据库
osm2pgsql -cGs -d osm -S /usr/local/share/osm2pgsql/default.style ~/Downloads/your_file.osm.pbf
当我在终端运行它,我得到以下错误:
Jonathans-MacBook-Pro:Downloads rjth$ osm2pgsql -cGs -d osm -S
/usr/local/share/osm2pgsql/default.style ~/Downloads/vienna-bratislava.osm.pbf
osm2pgsql SVN version 0.84.0 (64bit id space)
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
NOTICE: table "planet_osm_point" does not exist, skippin
NOTICE: table "planet_osm_point_tmp" does not exist, skipping
SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2);
failed: ERROR: function addgeometrycolumn(unknown, unknown, integer, unknown, integer) does not exist
LINE 1: SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, ...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
Error occurred, cleaning up
2014-02-23
rjth
+2
肯定看起来像'create extension postgis;'要么没有完成,要么失败。如果您认为它已完成,您能向我们展示您创建postgis扩展的psql会话的输出吗? –