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

Can someone give any suggestion how can I append missing states (everything left of Moscow, including Moscow) to the russian map in the whole asian file? I tried

osmium merge ./asia-latest.osm.pbf ./northwestern-fed-district-latest.osm.pbf ./central-fed-district-latest.osm.pbf -o merged.pbf

and it crashed when porting nodes to the database: Processing: Node(1255048k 1457.7k/s) Way(156069k 11.50k/s) Relation(0 0.00/s)result COPY END for planet_osm_ways failed: ERROR: duplicate key value violates unique constraint "planet_osm_ways_pkey" DETAIL: Key (id)=(23535867) already exists. CONTEXT: COPY planet_osm_ways, line 119375 DB copy thread failed: Ending COPY mode

Then I tried converting all files to "o5m" extension and run:

osmconvert centr.o5m sev_zapad.o5m asia.o5m -o=merge_again.osm.pbf

Now it all just turned out to give me the same asia map with no tiles added.


it turned out that when I manually zoomed closer, some mssing tiles were served, but at lower (0-6) zooms I still get empty tiles. Another thing: after I cleared "/var/lib/mod_tile" folder of rendered tiles and tried to draw the map, there didn't seem to be any rendering done, linke there is another place where already rendered tiles are stored. Is it possible that Mapnik keeps some separate cache for it tiles? How can I clear it?

And another problem, after I run:

render_list -a -Z 10 -n 5 --socket=/var/run/renderd/renderd.sock -m ajt -f

the systems starts doing something very hard (all 5 cores are loaded at 100%) but new maps in "/var/lib/mod_tile" appear at a very slow rate. I have already run this command with the previous map and it took less then a couple seconds to render 0-8 zoom levels, and now it took about 10 minutes and the processor was left covered in sweat. Why is that?

Another update:

Actually the command

osmconvert centr.o5m sev_zapad.o5m asia.o5m -o=merge_again.osm.pbf

worked ok. It was just that I had to use -f with a render_list to rerender all prevous blank tiles so they get updated with new data.

asked 06 Mar '20, 08:36

kartman1's gravatar image

accept rate: 0%

reverted 06 Mar '20, 12:23

osmium merge is supposed to handle duplicates but there may be corner cases where this will fail, especially if you are using files that were not downloaded at the same time.

What I would suggest that you do is, rather than using an Asia extract and trying to add pieces to it, create your own extract from the planet file:

  1. download planet-latest.osm.pbf
  2. create an extract with osmium extract
  3. feed that into osm2pgsql

The extract creation is documented on - basically if you can work with a rectangular area you would call

osmium extract --bbox 24.52,7.64,172.88,77.15 -s smart planet-latest.osm.pbf -o myfile.osm.pbf

and if you'd rather cut out a polygon you would have to define a simple outline first e.g. using QGIS (save as GeoJSON) or JOSM (save as poly file), then use the --polygon flag instead of --bbox.

permanent link

answered 06 Mar '20, 09:28

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
accept rate: 23%

edited 06 Mar '20, 10:42

Thanks. I'll mark it as an answer though I didn't try it, because the command from the question actually worked.

(06 Mar '20, 12:21) kartman1

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 06 Mar '20, 08:36

question was seen: 1,766 times

last updated: 06 Mar '20, 12:51

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