Skip to content

Conversation

@lonvia
Copy link
Member

@lonvia lonvia commented Oct 5, 2025

This adds a new parameter end_id to the diff processing functions, which allows to define the precise ID when to stop downloading diffs. This gives more fine-grained control over the number of diffs downloaded than max_size can do.

The tools pyosmium-get-changes and pyosmium-up-to-date get two new parameters where you can define the end date either with an ID or a date. The latter will automatically compute the appropriate ID for your convenience. Just keep in mind that date-to-ID conversions are always approximate. There is no guarantee that using --end-date in one run and the same date as --start-date in the next run will result in continuous, non-overlapping diffs. Always use the returned ID as a base for the next run.

Adds proper typing for the tool code and some tests for pyosmium-up-to-date. The tests in turn uncovered that file replacement doesn't work as expected on Windows. So fixed that.

@lonvia lonvia merged commit b1e223e into osmcode:master Oct 5, 2025
28 checks passed
@lonvia lonvia deleted the end-of-diff-download branch October 5, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant