6

I'm importing the OSM planet to my PostgreSQL using the flat file option.

Now I have my database and my flat nodes file, I want to apply some diffs files.

After reading this :

Lastly, since you have to reimport for --flat-nodes, you should make sure to download a new Europe extract, and make sure to download PBF, not bzipped XML.

I understood I need to download the diff file and ALL planet file again. Is it correct? By importing without the flat file option and keeping all temp tables in database, I just need the diff file to do the update.

Please explain the correct process to apply diff updates using the flat nodes file.

  • Alternatively try asking at help.openstreetmap.org – scai Apr 4 '17 at 11:12
  • Damn! wasted 50 points ... ( can I say damn here? I'm from Brazil and don't know how bad is this word) – Magno C Apr 5 '17 at 0:31
  • Cross-post: help.openstreetmap.org/questions/55478/… – scai Apr 5 '17 at 6:51
  • 1
    Sure you can. But you should always mention other places with your question. Otherwise people may waste their time answering questions that have already been answered somewhere else. – scai Apr 5 '17 at 11:41
  • 1
    Ow. Ok. Understood. – Magno C Apr 5 '17 at 12:00
1

Following is quote of Frederik Ramm who answere this question on https://help.openstreetmap.org/questions/55478/help-updating-osm-data-using-flat-nodes-file

Applying diff updates with or without flat nodes is the same procedure, just that one needs the --flatnodes option on initial import and update, the other not.

You need to download all the diffs since your planet file was created, and apply them. For best performance, combine the diffs into one before you run osm2pgsql (using e.g. osmosis). If you want to configure continuous updates, use the --rrii Osmosis option initially and then --rri for each update. If you don't like to take guesses about when to start your replication, you can find out the highest node ID in your flat node file (osm2pgsql, when started in append mode, will usually say "highest node id in flat nodes file is ..."), then use the https://svn.openstreetmap.org/applications/utils/whichdiff/ utility to find the matching state.txt.

  • The question you are linking is my own question in that forum. I already accepted this answer there. Thanks anyway. – Magno C Jul 13 '18 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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