I'm trying to import some OSM data into my postgis database and can't seem to get it to work. The data is an a US state extract from geofabrik that was further reduced using OSM convert to my study area. I checked out the data in QGIS and it looks good.
Below is the error message I receive when run osm2pgsql. I checked the database after running the tool and there is only one table listed "spatial_ref_sys". Any ideas what I'm doing wrong?
C:\Users\moreland_t\Documents\OSM Playground\Data>osm2pgsql tennessee.osm_RPG_01
-d OSM -U postgres -W secretpassword -P 5432 -S default.style --hstore
osm2pgsql SVN version 0.69-21289M
Password:
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
CREATE TABLE planet_osm_point ( osm_id int4,"access" text,"addr:flats" text,"add
r:housenumber" text,"addr:interpolation" text,"admin_level" text,"aerialway" tex
t,"aeroway" text,"amenity" text,"area" text,"barrier" text,"bicycle" text,"bridg
e" text,"boundary" text,"building" text,"capital" text,"construction" text,"cutt
ing" text,"disused" text,"ele" text,"embankment" text,"foot" text,"highway" text
,"historic" text,"horse" text,"junction" text,"landuse" text,"layer" text,"learn
ing" text,"leisure" text,"lock" text,"man_made" text,"military" text,"motorcar"
text,"name" text,"natural" text,"oneway" text,"operator" text,"poi" text,"power"
text,"power_source" text,"place" text,"railway" text,"ref" text,"religion" text
,"residence" text,"route" text,"service" text,"shop" text,"sport" text,"tourism"
text,"tunnel" text,"waterway" text,"width" text,"wood" text,"z_order" int4,tags
hstore );
failed: ERROR: type "hstore" does not exist
LINE 1: ... text,"width" text,"wood" text,"z_order" int4,tags hstore );
^
Error occurred, cleaning up
asked 05 Oct '12, 21:16

T_9er
46●1●1●3
accept rate: 0%
edited 05 Oct '12, 23:05

Frederik Ramm ♦
82.5k●92●720●1273
Thanks for the reply. I was able to load the hstore extension but then ran into several other problems. I'm working on a windows machince and found the following turorial every helpful in finding a fix for the issues I kept running into. https://github.com/springmeyer/win-osm-workshop/blob/master/Tutorial.md#step-6-configure-the-osm-postgis-database
There is no recent version of osm2pgsql for Windows. You may be better off running a linux VM then trying to get everything working on Windows