On Wed, 2008-12-10 at 00:33 +0100, Nop wrote:
Hello!
I am trying to set up a mapnik instance, but I cannot get osm2pgsql to
run. I have followed the instructions on
http://wiki.openstreetmap.org/wiki/Mapnik/PostGIS but they are rather
sketchy so I need some pointer on where the problem is.
I have created a DB gis. First I got an error missing function so I
concluded that I had to create the db from the template_postgis, though
the Wiki does not mention this.
Copying the postgis template should not be needed, normally the postgis
extensions would be added to the DB in the step which mentions
lwpostgis.sql
My user is superuser and owner of the
db. When I try to import a small osm file, I get the following error.
osm2pgsql SVN version 0.55-20081113 $Rev: 10464 $
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2 );
failed: ERROR: AddGeometryColumns() - invalid SRID
CONTEXT: SQL statement SELECT AddGeometryColumn('','', $1 , $2 , $3 ,
$4 , $5
)
PL/pgSQL function addgeometrycolumn line 4 at SQL statement
Error occurred, cleaning up
Can anybody tell what the problem is?
What version of PostgreSQL PostGIS are you using? This is the first
time I have seen it fail like this.
The fix is probably to run:
$ psql gis
gis= \i PATH/TO/.../export/osm2pgsql/900913.sql
This should add the 900913 SRID into the supported PostGIS projections
Jon
___
talk mailing list
talk@openstreetmap.org
http://lists.openstreetmap.org/listinfo/talk