Hi,

I want to setup a Postgresql/postgis DB and fill it with data from a xml-file using osmosis. For this I'm using this tutorial:
http://wiki.openstreetmap.org/wiki/Osmosis_PostGIS_Setup

I'm using Ubuntu 10.10 with Postgresql-8.4 and osmosis-0.39

I followed the instructions from the tutorial to setup the database and edited some paths to match with my filesystem.

sudo su - postgres
createdb osm
createlang plpgsql osm
createuser user

psql -d osm -f /usr/share/postgresql/8.4/contrib/postgis-1.5/postgis.sql
psql -d osm -f /usr/share/postgresql/8.4/contrib/postgis-1.5/spatial_ref_sys.sql
psql -d osm -f /usr/share/postgresql/8.4/contrib/hstore.sql
psql -d osm -f /home/benny/Desktop/DA/programme/osmosis-0.39/script/pgsimple_schema_0.6.sql

Those commands worked without errors.

When I run osmosis with:
./osmosis --read-xml file="/media/daten/osm/someplace.osm" --write-pgsql user="user" database="osm" password="osm"

I get the error:

SCHWERWIEGEND: Thread for task 1-read-xml failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: The database schema version of 5 does not match the expected version of 6. at org.openstreetmap.osmosis.pgsnapshot.common.SchemaVersionValidator.validateDBVersion(SchemaVersionValidator.java:67) at org.openstreetmap.osmosis.pgsnapshot.common.SchemaVersionValidator.validateVersion(SchemaVersionValidator.java:47) at org.openstreetmap.osmosis.pgsnapshot.v0_6.impl.CopyFilesetLoader.run(CopyFilesetLoader.java:78) at org.openstreetmap.osmosis.pgsnapshot.v0_6.PostgreSqlCopyWriter.complete(PostgreSqlCopyWriter.java:108)
    at org.openstreetmap.osmosis.xml.v0_6.XmlReader.run(XmlReader.java:110)

I don't really understand that. Aren't the sql-scripts for creating the DB compatible to the osmosis-version they're coming with?!

Thanks for any hint,
Benjamin

_______________________________________________
dev mailing list
[email protected]
http://lists.openstreetmap.org/listinfo/dev

Reply via email to