[OSM-dev] Trouble with osm2pgsql and Postgres 8.4, Postgis 1.4

Tom Taylor tom at tomtaylor.co.uk
Sun Oct 4 11:19:47 BST 2009


Hi all,

I'm trying to get an environment up and running for Mapnik on OS X 10.6.

I'm using Postgres 8.4 and Postgis 1.4. I've compiled osm2pgsql, but  
whenever I attempt to import data I get the following:

	mu:~ tom$ osm2pgsql -m -d osm Downloads/great_britain.osm.bz2
	osm2pgsql SVN version 0.67-exported

	Projection code failed to initialise

This is a bit confusing, because I've installed the projection  
correctly, and I can see it when I do:

	osm=# SELECT * from spatial_ref_sys WHERE srid=900913;

The database was created with the following commands:

	$ createdb osm
	$ createlang plpgsql osm
	$ psql -d osm -f /usr/local/Cellar/postgresql/8.4.0/share/contrib/ 
postgis.sql
	$ psql -d osm -f /usr/local/Cellar/postgresql/8.4.0/share/contrib/ 
spatial_ref_sys.sql

If I define the projection on the command line, I get:

	$ osm2pgsql -E 900913 -d osm Downloads/great_britain.osm.bz2
	osm2pgsql SVN version 0.67-exported

	Couldn't read EPSG definition (do you have /usr/share/proj/epsg?)

I don't - my proj projections are in /usr/local/share/proj. And 900913  
is in esri.extra.

If I set it to 4326 (which *is* in /usr/local/share/proj/epsg), I get  
"Projection code failed to initialise".

I know I've got a bit of a weird setup - I'm using Homebrew (http://github.com/mxcl/homebrew/ 
) - but has anyone got any suggestions of what to do next?

Thanks a lot,

Tom




More information about the dev mailing list