NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Im trying to upload 8GB osm file into API db, i truncated it before so its empty but as it appears its not. Postres throws error duplicated key. What is the best way to add new region to map, or how to clear data, so that configuration remains unchanged?

Here is my osmosis command: nohup osmosis --read-xml file.osm --write-apidb authFile=Auth.txt validateSchemaVersion=no 2> errorOutput.txt > output.txt &

asked 09 Jun '16, 15:53

jorax's gravatar image

jorax
26335
accept rate: 0%

Without seeing the data we can only speculate...

Assuming that the API db was really empty, maybe you're somehow trying to load the same thing twice?

(09 Jun '16, 19:51) SomeoneElse ♦

I downloaded 3 countries from geofabrik and merged them with osmosis. I dont think geofabrik files overlap with each other. Besides i used grep to scan for this duplicated id. It was found only once. I used --truncate-apidb before, but my guess is it doesnt work as it should. Is there any other way to append missing data? Somthing that will ignore duplicated data?

(09 Jun '16, 21:07) jorax

https://help.openstreetmap.org/questions/45930/osmosis-import-duplicate-key-value-violates-unique-constraint

outdated osmosis was the reason. Im using updated version right now. I'll post if this solved the problem but im pretty sure it will. Kinda sad that apt-get update doesn't work here, i had to install it manually.

EDIT: confirmed, remember always to use updated tools

permanent link

answered 10 Jun '16, 09:18

jorax's gravatar image

jorax
26335
accept rate: 0%

edited 13 Jun '16, 11:30

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×290
×252

question asked: 09 Jun '16, 15:53

question was seen: 2,619 times

last updated: 13 Jun '16, 11:30

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum