0

How can I successfully combine Open Street Map vector data with the latest building footprint data from Google/Microsoft or Overture Maps, and convert the result to a PMTiles file successfully?

The problem

I have downloaded full map data (.osm.pbf format) of a region from Geofrabrik.de and removed all buildings. Then I downloaded the buildings data from this website, extracted the regional data I wanted from the Planet & Microsoft/Google files (.osm.pbf format) and merged them. I then merged the buildings data with the map. Great.

However, when I try to convert the osm.pbf file to PMTiles with Planetiler, I get the error "Nodes must be sorted ascending by ID". Then, if I try to 'renumber' the file with Osmium, I get the error "Node ID twice in input. Maybe you are using a history or change file?"

How can I overcome this issue?

2
  • Do you get any clue about what's causing the "Node ID twice in input"? That would help you understand what's causing the problem. Is it the same node twice, or different versions of the same node? A node can of course be part of both a building and something else. Commented Jul 9 at 11:16
  • No, but I've just posted an answer with the solution. It's not ideal as it requires you to merge files before extracting data, which was a very slow process in my case as they were huge, but it worked.
    – Sidders
    Commented Jul 10 at 6:49

1 Answer 1

1

I ended up resolving this myself after finding this post on Github:

If the files you downloaded were extracted at the same point in time, this will always give you a valid data file without duplicate nodes.

So after merging the massive files, THEN extracting the data I wanted, I did not have further issues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.