0

Can someone help me on this question?

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.

http://gis.stackexchange.com/questions/233988/how-to-update-osm-planet-diffs-using-flat-nodes-file

asked 05 Apr '17, 01:28

Carlos%20M%20Abreu's gravatar image

Carlos M Abreu
21336
accept rate: 0%


One Answer:
3

The "since you have to reimport..." quote above was in response to someone who had not used the --flatnodes option during import hence it doesn't apply to you.

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.

permanent link

answered 05 Apr '17, 07:37

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
73.3k866641137
accept rate: 24%

1

Very well explained! Many thanks. I spent 50 points of my reputation in GIS S.E. for nothing .... :-(

(10 Apr '17, 13:22) Carlos M Abreu

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:

×294
×6
×5

question asked: 05 Apr '17, 01:28

question was seen: 2,078 times

last updated: 10 Apr '17, 13:22

powered by OSQA