I am currently working on data i wish to Geo-code (Get the map references based on a table with addresses). The information is a bit sensitive so i would like to do this on my own personal computer instead of using a google/bing API call across the internet.
To do this, I have read that i need to install osm2pgsql into my PostgreSQL database. I am having a great deal of trouble with this. I implemented the steps below
1. Downloaded the OSM files for the countries i was interested in from
Connection to database failed: FATAL: database "gis" does not exist
This is true my database is called testDB. Does anyone know where i can change this in the code
I'm the owner of the blog you link to. The problem is that osm2pgsql attempts to import the data into a database called 'gis', which is assumed to exist. I vaguely remember that there is an option to osm2pgsql to give the name of the database to use, try osm2pgsql --help or similar to check for such an option.
The post is quite old, and I've since written another blog post that uses Osmosis to import OSM data into a PostGIS enabled database:
I attempted to follow the blog but am afraid i got stuck on the command line stuff
I have a file of Europe which i converted to .OSM using osmconvert (190 gigs)
The file is located in C:\My Documents\Downloads\Europe.osm
The database i wish to load the information into is testDB where my other tables are located
All I wish to do is get the street names countries and towns out of the osm and into the database so i can compare my 500 or so addresses to it ande get a rough idea where these places are.
As an alternative, I tried using a utility called OSM2SHP which converts the OSM to a shapefile but the shape file appears to be too large for it (I think, the memory usage went through the roof and the disk accesses went up to 100% but this varied form 98% to 100% for both fields, i left it run for 3 hours) as it said not responding. The aim was then to use import feature in postgresql to import the shape file
Again thank you for your help, this is becoming remarkably frustrating