I am trying to import OpenStreetMap (osm) data into a PostgreSQL database using osm2pgsql, and then I need to convert that data so I can use it in ArcSDE/ArcGIS Desktop 10.2.
Here is what I do:
- Using the PGAdmin GUI tool, I create a database call OSM
I then enabled the PostGIS on the database:
CREATE EXTENSION postgis;
Since I am on a Window environment, I created a path variable to the osm2pgsql.exe
- Open a command prompt
Load a small sample set of OSM data:
osm2pgsql -l -c -d osm -U postgres -H localhost -S C:\osm2psql\default.style C:\temp\refine.osm
At this point I get the error
Projection code failed to initialise
Since I encountered that error, I figured I had to install the proj v.4 lib and I added that to the environmental path, but I still get the issue.
How do you resolve this issue?
I need my data in 4326, not in 900913. I think this is the reason why my data will not show in ArcGIS.
If I load the data without the -l command, which means lat/long, I get an invalid coordinate ID error from ArcGIS Desktop.