Using osm2pgsql to import an OSM-File to PostGIS I get the following error: SELECT AddGeometryColumn('planet_osm_point', 'way', 900913, 'POINT', 2 ); failed: FEHLER: AddGeometryColumn() - invalid SRID CONTEXT: SQL statement "SELECT AddGeometryColumn('','',$1,$2,$3,$4,$5, $6)" PL/pgSQL-Funktion »addgeometrycolumn« Zeile 5 bei SQL-Anweisung Error occurred, cleaning up Any hints what could be wrong would be helpful! Thank you. asked 23 May '12, 12:59 faxx |
Your version of osm2pgsql is ancient. This is likely to give you more trouble in the future but for now, running this file through your PostGIS will likely help: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql/900913.sql For the record, if you have a rather new PostGIS, the easiest way is often not to add this projection but to make osm2pgsql use 3857 (-E 3857). answered 23 May '12, 14:24 Frederik Ramm ♦ I have latest version of osm2pgsql(downloaded and installed from github) but I still ran into that problem. The download link for 900913.sql doesn't work anymore but if you installed osm2pgsql also from source code then you should have the file in here: /usr/local/share/osm2pgsql/900913.sql So what i did to fix this problem was following code: psql -f /usr/local/share/osm2pgsql/900913.sql -d gis
(18 Jun '14, 11:49)
hukko
|
Sorry, just recognised I forgot some information: Windows (I know, Linux could do better...) osm2pgsql SVN version 0.69-21289M, pgAdmin III