2016-02-28 59 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