I’m trying to work on openstreetmaps with TileMill.
I’ve installed postgres, postgis and osm2pgsql using homebrew.
However when it comes to import of osm data into postgres I’m getting an error:
“ERROR: AddGeometryColumn() – invalid SRID”
It’s like osm2pgsql is creating sql which is incompatibile with postgis.
I’m following tutorial:
http://mapbox.com/tilemill/docs/guides/osm-bright-mac-quickstart/
OS used:
Lion
I’ve had the same issue recently.
You problem means that you haven’t installed Mercator projection. You can fix it with:
wget http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/900913.sql && psql -f 900913.sql gis
You’ll soon meet a next error “ERROR: function setsrid(box3d, integer) does not exist”:
https://github.com/mapbox/tilemill/issues/1375
🙂
Try following my notes from:
https://gist.github.com/2417488
Good luck!