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

I must be missing something basic here. I am attempting to manually step through the process of getting change files from https://download.geofabrik.de/australia-oceania-updates/000/002/ so I can then automate via script.

Curently my workflow is:

  1. Initialise a working directory with config and download lock files with

    osmosis --read-replication-interval-init workingDirectory=%WORKOSM%

  2. Adjust the state date/time to something in the changelist then check the interval that should be covered by changes

osmosis -q --read-replication-lag humanReadable=yes workingDirectory=%WORKOSM%

11day(s) and 0 hour(s)

  1. Then run an the command to download the change files

osmosis --rri workingDirectory=%WORKOSM% --wxc %WORKOSM%\change.osc.gz

but all I get is a gzip of an empty xml file?? (1kB).

<?xml version='1.0' encoding='UTF-8'?>
<osmChange version="0.6" generator="Osmosis 0.47">
</osmChange>

Can anyone help me with what I've done wrong here?

asked 06 Mar '20, 01:21

Quannah's gravatar image

Quannah
26226
accept rate: 0%

edited 06 Mar '20, 01:26

Not a direct answer to the question, but from the perspective of keeping a tile server up to date you might find the notes here useful. They use scripts such as this one. Rather than just downloading updates for one continent that script downloads everything but throws away what it doesn't want before loading the database. I'm sure that you can borrow from there to achieve what you want though.

(06 Mar '20, 01:32) SomeoneElse ♦

Thanks! In the script (https://github.com/SomeoneElseOSM/mod_tile/blob/zoom/openstreetmap-tiles-update-expire) its line 155 that has me stumped. I just get an empty xml file. Should I be downloading all the .osc from the page and then merging them? The osmosis documentation makes it sound like that command should create an .osc file with all the changes inside.

(06 Mar '20, 02:52) Quannah
1

I had written an answer but deleted that again because I think I was on the wrong track. Can you share the contents of the state.txt and configuration.txt files in your %WORKOSM% directory?

(06 Mar '20, 08:21) Frederik Ramm ♦

Thanks Frederik - my state and config files look like:

--Thu Mar 05 15:17:54 AEST 2020 sequenceNumber=2543 timestamp=2020-03-04T21\:59\:03Z

and the configuration file looks like:

--The URL of the directory containing change files.

baseUrl=https://download.geofabrik.de/australia-oceania-updates/

maxInterval = 604800

(12 Mar '20, 01:48) Quannah

Hello all, To download change files from Geofabrik you can use my getdiff program from https://GitHub.com/waelhammoudeh/getdiff I hope this helps somebody

Good day

permanent link

answered 19 Apr '22, 21:01

Wael's gravatar image

Wael
11336
accept rate: 0%

A bit late but if you get the details of the state file of the day you downloaded your geofabrik file, then replace your current state file with the state of when you first downloaded. then you should see the change file populated. if should work with a state file from a couple days ago rather than when you first downloaded the geofabrik file but I haven't tested it. I think your osc file is empty because the state file might be the latest one, and osmosis will try to get the changes from that state file so the were wont be any chnages.

permanent link

answered 10 Nov '20, 17:34

shafi-as's gravatar image

shafi-as
107712
accept rate: 0%

Please don't use Osmosis any more. Not only is it cumbersome to use, but Osmosis isn't maintained any more and contains known bugs.

Here is a better solution: https://github.com/osmcode/pyosmium/blob/master/doc/updating_osm_data.rst

permanent link

answered 06 Mar '20, 09:02

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074
accept rate: 31%

Thanks Jochen - but regardless of solution I think maybe I'm missing something basic in the state and config usage. I'll be sure to check out pyosmium - it looks easier to troubleshoot

(12 Mar '20, 01:57) Quannah

It does look good but I think having to build it from source is going to be an issue. I can work with python and shell commands but I'm not a C++ or .Net developer. Do you know if there is an installer or executable ?

(12 Mar '20, 03:57) Quannah
2

There are prebuild binaries available. You should be able to just "pip install osmium" as documented on https://github.com/osmcode/pyosmium

(12 Mar '20, 07:30) Jochen Topf

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

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:

×252
×127
×11
×11

question asked: 06 Mar '20, 01:21

question was seen: 3,513 times

last updated: 19 Apr '22, 21:01

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