This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Error occurs when use osmosis to import data into apidb.

0

When i run osmosis --read-pbf planet/tianjin_china.osm.pbf --write-apidb host="localhost" database="openstreetmap" user="osm" password="buaanlp" validateSchemaVersion="no" command, some errors appeared. It said duplicate key value violates unique constraint "nodes_pkey"

alt text

alt text

I have used this command to import beijing_china.osm.pbf into the apidb, and the same errors occurred. I drop the database and create it again, then the error disappeared. But when i run the command secondly, the error still occurs, how to solve this problem? I don't want to drop the database again.

asked 30 Aug '16, 13:03

yuyy's gravatar image

yuyy
236222431
accept rate: 20%

Source code available on GitHub .