2016-02-28 77 views
0

我一直在按照本指南设置我自己的osm节点。 https://switch2osm.org/serving-tiles/manually-building-a-tile-server-14-04/使用osm2pgsql导入地图时出错

我已经走了低谷所有的编译和配置无并发症(两次),但在这两种运行我结束了以下错误

Using built-in tag processing pipeline 
Using projection SRS 3857 (Spherical Mercator) 
Setting up table: planet_osm_point 
Osm2pgsql failed due to ERROR: CREATE TABLE planet_osm_point (osm_id int8,"access" text,"addr:housename" text,"addr:housenumber" text,"addr:interpolation" text,"admin_level" text,"aerialway" text,"aeroway" text,"amenity" text,"area" text,"barrier" text,"bicycle" text,"brand" text,"bridge" text,"boundary" text,"building" text,"capital" text,"construction" text,"covered" text,"culvert" text,"cutting" text,"denomination" text,"disused" text,"ele" text,"embankment" text,"foot" text,"generator:source" text,"harbour" text,"highway" text,"historic" text,"horse" text,"intermittent" text,"junction" text,"landuse" text,"layer" text,"leisure" text,"lock" text,"man_made" text,"military" text,"motorcar" text,"name" text,"natural" text,"office" text,"oneway" text,"operator" text,"place" text,"poi" text,"population" text,"power" text,"power_source" text,"public_transport" text,"railway" text,"ref" text,"religion" text,"route" text,"service" text,"shop" text,"sport" text,"surface" text,"toll" text,"tourism" text,"tower:type" text,"tunnel" text,"water" text,"waterway" text,"wetland" text,"width" text,"wood" text,"z_order" int4,way geometry(POINT,3857)) WITH (autovacuum_enabled = FALSE) failed: ERROR: type "geometry" does not exist 
LINE 1: ... text,"width" text,"wood" text,"z_order" int4,way geometry(P... 

我已经走了一次低谷数据库配置一切似乎都是有序的。任何想法如何调试/解决这个问题?

谢谢。

回答

1

type "geometry" does not exist部分清楚地表明您没有安装postgis扩展。

也许你错过了/遗忘了以下关于在postgres数据库中创建扩展的教程的一部分?

替代你的用户名下面

+0

我已经做了以下内容: 创建扩展PostGIS的; ALTER TABLE geometry_columns OWNER TO username; ALTER TABLE spatial_ref_sys OWNER TO用户名; – Dormage

+0

再次检查每一步,我发现我在错误的数据库下创建了扩展几何。解决方案只是在创建扩展之前连接到数据库(在我的情况下命名为gis)。谢谢! – Dormage