在Mac OS中将.osm数据加载到POSTGIS时出错。有人能帮我吗?

在Mac OS中将.osm数据加载到POSTGIS时出错。有人能帮我吗?,postgis,openstreetmap,Postgis,Openstreetmap,我是第一次使用OpenMaps,我下载了文件north america latest.osm.pbf。我正在尝试加载到PostGIS,从那里我可以导入到其他数据库 我安装了postGIS uisngbrew安装postGIS。它似乎已成功安装并在后端运行。现在我正试图将该文件导入postGIS,但它给我带来了错误 osm2pgsql--create--database-gis-north-america-latest.osm.pbf 以下是错误: osm2pgsql version 0.96.0

我是第一次使用OpenMaps,我下载了文件
north america latest.osm.pbf
。我正在尝试加载到PostGIS,从那里我可以导入到其他数据库

我安装了postGIS uisng
brew安装postGIS
。它似乎已成功安装并在后端运行。现在我正试图将该文件导入postGIS,但它给我带来了错误

osm2pgsql--create--database-gis-north-america-latest.osm.pbf

以下是错误:

osm2pgsql version 0.96.0 (64 bit id space)

Using built-in tag processing pipeline
Using projection SRS 3857 (Spherical Mercator)
Setting up table: planet_osm_point
2019-11-14 14:56:07.732 PST [11115] ERROR:  type "geometry" does not exist at character 1100
2019-11-14 14:56:07.732 PST [11115] STATEMENT:  CREATE UNLOGGED 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,"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 )
Osm2pgsql failed due to ERROR: CREATE UNLOGGED 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,"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...
我在SO和互联网上查阅了许多资源。我无法正确理解,因为加载数据似乎有很多解决方案


如果我能得到这些步骤(如果我做错了)或任何GUI工具,只需点击一个按钮就可以帮助我导入这些数据,我将不胜感激。

安装PostGIS是不够的。您还需要在要使用的每个数据库中启用它


连接(通过
psql
控制台,
pgadmin
等)到
gis
数据库并运行
CREATE EXTENSION postgis

请您添加步骤。。。。这对我没什么帮助