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:
osmosis -q --read-replication-lag humanReadable=yes workingDirectory=%WORKOSM%
osmosis --rri workingDirectory=%WORKOSM% --wxc %WORKOSM%\change.osc.gz but all I get is a gzip of an empty xml file?? (1kB).
Can anyone help me with what I've done wrong here? asked 06 Mar '20, 01:21 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 answered 19 Apr '22, 21:01 Wael |
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. answered 10 Nov '20, 17:34 shafi-as |
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 answered 06 Mar '20, 09:02 Jochen Topf 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
|
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.
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.
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?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