This is a static archive of our old OSM Help Site. Please post any new questions and answers at community.openstreetmap.org.

What’s the good way to get a freshly downloaded planet-latest.osm.pbf up to date as it’s published once per week ?

0

EDIT: see next question please (reformulated as I did not have answers to the first one)

Hi,

I don't really understand what Osmosis 'maxInterval' configuration option does when using osmosis --read-replication-interval workingDirectory=. --simplify-change --write-xml-change changes.osc.gz.

My understanding is: it helps to merge multiple .osc.gz files available at the replication tree baseUrl to a merged changes.osc.gz file.

For instance, if Osmosis configuration options are set to

the behaviour will be: Osmosis get all available xxx.osc.gz daily changes at /replication/day/ for which the corresponding xxx.state.txt file

  • indicates a sequenceNumber higher than the sequenceNumber of $osmosis_workind_dir_state.txt
  • indicates a timestamp higher than the 'timestamp_1' of $osmosis_workind_dir_state.txt and lower than 'timestamp_1' + 345600

and then produce a changes.osc.gz file merging all these changes which are "simplified" (result file contains "a maximum of one change per entity"). With these settings, the limit is 7 .osc.gz daily changes for each Osmosis run.

Is it correct ?

Hope it is clear, thanks in advance.

Augustin

asked 21 Jan '20, 10:45

augustind's gravatar image

augustind
1663413
accept rate: 10%

edited 26 Jan '20, 18:38

Hi Augustin - did you end up solving this? I'm trying to do much the same thing and struggling to get changes downloaded. Be interested in your solution

Cheers

(05 Mar '20, 04:57) Quannah

One Answer:

0

Hi,

Just to pull up the question .. does anybody has an idea if last statement is correct ?

My main goal is to apply in one shot all the diffs available to planet-osm-latest.osm.pbf (because it's published only once per week) to get the freshest data as possible, regardless the day of the week I download it.

My solution for now is:

  1. get the latest available planet-latest.osm.pbf and /replication/day/state.txt file at https://planet.osm.org/
  2. get the corresponding replication number X
  3. download all the Y.osc.gz available where X - 7 < Y <= X
  4. use osmium merge-changes to merge all Y.osc.gz files to a merge.osc.gz
  5. use osmium apply-changes to apply merge.osc.gz to the latest available planet-latest.osm.pbf

but I guess I could use osmosis --read-replication-interval workingDirectory=. --simplify-change --write-xml-change merge.osc.gz to avoid steps 1 to 4 by getting in one shot desired merge.osc.gz.

I tried last settings (maxInterval=345600 - one week in seconds - with the Planet OSM daily replication tree) but I got errors like "Pipeline entities are not sorted", like here

Hope you can help :) thanks,

Augustin

PS: I will retitle the question to make it more clear

answered 26 Jan '20, 18:34

augustind's gravatar image

augustind
1663413
accept rate: 10%

edited 26 Jan '20, 18:40

OSZAR »