I've installed Rails port using the guide from http://wiki.openstreetmap.org/wiki/Rails and http://wiki.openstreetmap.org/wiki/Rails_on_Ubuntu Also installed osmosis using the guide from http://wiki.openstretmap.org/wiki/Osmosis/Installation
All installed ok on an Ubuntu 10.04 server running over a DELL PowerEdge R710 with 450Gb for the Postgres DB partition and 12Gb of RAM. I downloaded the planet osm file form http://planet.openstreetmap.org/planet-latest.osm.bz2 ( to be honest is the planet-latest for 27 October 2010, at the moment I'm downloading the new current latest ) and also downloaded some osm files for different countries from http://downloads.cloudmade.com To extract the information of a zone using the planet osm file I use this sentence : bzcat planet-101027.osm.bz2 | osmosis --read-xml file=/dev/stdin enableDateParsing=no --bounding-box top=43.5 left=-3.5 bottom=42.0 right=-1.0 --write-xml file=- | bzip2 > extracted.osm.bz2 It takes a long time to complete but all seems to be ok. To populate an empty API DB from the osm files I use this sentence : bzcat file.osm.bz2 | osmosis --read-xml-0.6 file=- --write-apidb-0.6 populateCurrentTables=yes host="localhost" database="openstreetmap" user="openstreetmap" password="xxxxx" validateSchemaVersion=no I'm getting the following types of errors ( depending on the osm file used ) : Using Ecuador osm file form Cloudmade at Feb 8, 2011 : SEVERE: Thread for task 1-read-xml-0.6 failed org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to insert user with id 222199 into the database. Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "users_display_name_idx" Using Ghana osm file form Cloudmade at Feb 8, 2011 : SEVERE: Thread for task 1-read-xml-0.6 failed org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to load current way nodes. Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "current_way_nodes" violates foreign key constraint "current_way_nodes_node_id_fkey" Detail: Key (node_id)=(24152848) is not present in table "current_nodes" Using the osm file result of the extract sentence I've writed earlier : SEVERE: Thread for task 1-read-xml-0.6 failed org.openstreetmap.osmosis.core.OsmosisRuntimeException: Unable to load current way nodes. Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "current_way_nodes" violates foreign key constraint "current_way_nodes_node_id_fkey" Detail: Key (node_id)=(490767853) is not present in table "current_nodes" Using Spain osm file from Cloudmade at Feb 8, 2011 : All ok. I can use JOSM to access ( and even change ) the data from the API DB. The API BD is always new ( dropdb : createdb : rake db:migrate : rake test ) before the population senteces. What I'm doing wrong ?
_______________________________________________ osmosis-dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/osmosis-dev
