I merged Europe and North America .os.bz2 files from http://download.geofabrik.de/ using the command osmium merge country1.osm.bz2 country2.osm.bz2 -o together.osm.bz2. Then I started extraction of the merged file using the command ./utils/setup.php --osm-file together.osm.bz2 --all 2>&1 | tee setup.log. After running this command I got the error below:
After this extraction stopped. What could have had caused it and how to solve this issue? asked 06 Aug '20, 06:10 Saurav1997 scai ♦ |
The error message isn't easy to read, but the important detail is this part: "planet_osm_rels failed: ERROR: duplicate key value violates unique constraint". And it even says what the id is: 11980. So presumably the relation 11980 was in together.osm.bz2 twice. This relation is the France relation and France has many overseas departments etc. so it might well be that it was in the Europe and North America extracts. Now the question is why was it in the merged files twice? The most probably reason is that you downloaded the two original extracts at different points in time and they both contained different versions of the same relation. In that case osmium merge will leave both in there, as documented in the man page: "Do not use this command to merge non-history files with data from different points in time. It will not work correctly." But this is guess work, because I don't know what's in the files you downloaded. You can check this with "osmium getid". answered 09 Aug '20, 10:29 Jochen Topf |
Please do not just paste an error here. Describe what you tried to do. This should also include a description where you got your data from and how you merged it.
Originally posted at https://github.com/osm-search/Nominatim/issues/1905 (now closed as duplicate for this question)
Sorry for not giving a proper description. I have added a new question with proper details. Link: https://help.openstreetmap.org/questions/76032/error-while-extracting-merged-database-for-nominatim
Don't add a new question. Edit this question instead.
I have edited it.