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, 01:21

Quannah's gravatar image

Quannah
11125
accept rate: 0%

edited 06 Mar, 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, 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, 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, 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, 01:48) Quannah

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, 09:02

Jochen%20Topf's gravatar image

Jochen Topf
4.6k54666
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, 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, 03:57) Quannah
1

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

(12 Mar, 07:30) Jochen Topf
Your answer
toggle preview

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:

×229
×113
×10
×10

question asked: 06 Mar, 01:21

question was seen: 262 times

last updated: 12 Mar, 07:30

powered by OSQA