Hello, I have problems to follow the examples on: http://wiki.openstreetmap.org/wiki/Osmosis While I am trying to start: 'osmosis --read-xml file="myosm.osm" --write-apidb host="localhost" database="postgis" user="postgres" password="xxx"' I get the following errors. The database is fresh and clean. My OS is Win x64 Here is the exception trace: SCHWERWIEGEND: Thread for task 1-read-xml failed org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to create resultset. at org.openstreetmap.osmosis.apidb.common.DatabaseContext.executeQuery(DatabaseContext.java:429) ...etc... at java.lang.Thread.run(Unknown Source) Caused by: org.postgresql.util.PSQLException: FEHLER: Relation +schema_migrations½ existiert nicht Position: 21 at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062) ...etc... at org.openstreetmap.osmosis.apidb.common.DatabaseContext.executeQuery(DatabaseContext.java:424) asked 09 May '11, 09:49 asdfasdfasdf TomH ♦♦ |
Have a look at this answer http://help.openstreetmap.org/questions/4331/error-loading-the-osm-file-into-the-database. You do not appear to have installed the database tables in PostGIS. answered 09 May '11, 10:17 SK53 ♦ Is there a complete script/application for windows? 'http://wiki.openstreetmap.org/wiki/Osmosis/PostGIS_Setup' and especially the 9.04 section is useless for windows because of environment variables/ user restrictions and other things.
(09 May '11, 19:03)
asdfasdfasdf
The standard PostGIS tools work for me under Windows. Perhaps try with cygwin, or use pgadmin & copy paste DDL into query window. In general its usually best to run things either with full paths or a specially constructed PATH within a DOS shell.
(09 May '11, 21:23)
SK53 ♦
Can you tell me which files i have to paste into pgadmin. I already tried some of these. Especially the last one did not create the right shema (simple or something) for me. hstore.sql postgis.sql spatial_ref_sys.sql pgsql_simple_schema_0.6.sql
(09 May '11, 22:06)
asdfasdfasdf
I suggest you raise a new question for this: documentation for getting things working on windows is usually poor. Frequently bits of OSM software don't work on Windows for trivial reasons such as assuming "/" is the separator of directory and filenames. Therefore a broader question is likely to be of more use to everyone. Quickly, you need to install in this order postgis, hstore, either simple schema or the api schema. I don't know if you need spatial_ref_sys, but its easy to check by trying to load an empty or dumpy osm xml file.
(10 May '11, 10:19)
SK53 ♦
|
You've tried loading the data into the format used by the "Rails Port" by using the --write-apidb flag. Osmosis is checking for the tables it expects to find, but you say you have a clean database so it's failing. Note that the apidb format is designed for use with the web front end and only uses Postgres types (i.e. no spatial columns) so might not be what you are looking for. You need to decide what format you want the tables to be in, since osmosis supports a few different database structures. These can be chosen with the following options.
You need to investigate and decide which is the most appropriate. In every case you need to have the correct database tables set up before loading with osmosis. Instructions are available on the Osmosis Detailed Usage page. For loading data into postgres for use with mapnik you should look at osm2pgsql instead, which uses yet another choice of table layouts. answered 10 May '11, 16:50 Andy Allan |