Postgresql 使用osm2pgsql导入映射时出错

Postgresql 使用osm2pgsql导入映射时出错,postgresql,osm2pgsql,Postgresql,Osm2pgsql,我一直遵循这个指南来设置自己的osm节点。 我已经完成了所有编译和配置,没有出现任何复杂情况(两次),但在两次运行中,我都出现了以下错误 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_poin

我一直遵循这个指南来设置自己的osm节点。

我已经完成了所有编译和配置,没有出现任何复杂情况(两次),但在两次运行中,我都出现了以下错误

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...
我再次检查了数据库配置,似乎一切正常。有没有办法调试/修复这个问题

谢谢。

类型“geometry”不存在部分明确说明您没有安装postgis扩展

也许您错过了/忘记了关于在postgres db中创建扩展的教程的以下部分

将您的用户名替换为下面的用户名

类型“geometry”不存在
部分明确说明您没有安装postgis扩展

也许您错过了/忘记了关于在postgres db中创建扩展的教程的以下部分

将您的用户名替换为下面的用户名


我做了以下工作:创建扩展postgis;将表格几何图形\u列所有者更改为用户名;将表格spatial\u ref\u sys OWNER更改为用户名;再次检查每个步骤后,我注意到我在错误的数据库下创建了扩展几何体。解决方案只是在创建扩展之前连接到数据库(在我的例子中是名为gis)。谢谢我做了以下工作:创建扩展postgis;将表格几何图形\u列所有者更改为用户名;将表格spatial\u ref\u sys OWNER更改为用户名;再次检查每个步骤后,我注意到我在错误的数据库下创建了扩展几何体。解决方案只是在创建扩展之前连接到数据库(在我的例子中是名为gis)。谢谢