postgresql – 将osm文件导入postgres / postgis数据库
发布时间:2020-12-13 16:18:01 所属栏目:百科 来源:网络整理
导读:我使用工具osm2pgsql使用phppgadmin作为管理工具将osm文件导入postgres数据库.我只是以xml格式从osm下载了一个小镇,我在使用mac终端导入时遇到了麻烦.我有点像这样的菜鸟所以任何帮助将不胜感激.我看过几篇文章但没有提供我需要的清晰度以满足我的需求. 谢谢
我使用工具osm2pgsql使用phppgadmin作为管理工具将osm文件导入postgres数据库.我只是以xml格式从osm下载了一个小镇,我在使用mac终端导入时遇到了麻烦.我有点像这样的菜鸟所以任何帮助将不胜感激.我看过几篇文章但没有提供我需要的清晰度以满足我的需求.
谢谢 我得到这个错误可能是一些小不确定.. Using projection SRS 900913 (Spherical Mercator) Setting up table: planet_osm_point NOTICE: table "planet_osm_point" does not exist,skipping 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,integer) does not exist LINE 1: SELECT AddGeometryColumn('planet_osm_point',... ^ HINT: No function matches the given name and argument types. You might need to add explicit type casts.
您需要将postgis扩展安装到postgres数据库中.假设您在计算机上安装了postgis,则需要执行以下操作:
psql <database> < /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql postgis.sql的确切路径取决于您使用的分发以及它如何打包postgis.您可能还需要/需要使用如下命令安装空间参考系统表: psql <database> < /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |