Hi, I am trying to import a 2GB .osm file to a new empty postgresql database but the command I use fails and I have no idea why. This is the command: osmosis --read-xml file="D:\Licenta\Romania OSM\romania.osm" --write-pgsql host="localhost" database="romania" user="postgres" password="mypassword" This is the error I get: ... SEVERE: Thread for task 1-read-xml failed org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL gram mar [SELECT version FROM schema_info]; nested exception is org.postgresql.util.P SQLException: ERROR: relation "schema_info" does not exist Position: 21 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.d oTranslate(SQLErrorCodeSQLExceptionTranslator.java:233) ... Thank you asked 21 Mar '13, 07:59 raduzugravu |
You need to create the correct schema (i.e. create the database tables) first. One of the tables (i.e. relations) created will be called "schema_info", which osmosis checks before it loads anything, and that's where the error 'relation "schema_info" does not exist' comes from. Please have a read of the osmosis documentation on the PostgreSQL tasks. You will need to choose which of the schemas is appropriate for your task, then load the schema (e.g. answered 24 Mar '13, 09:03 Andy Allan |