-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add version argument #301
base: master
Are you sure you want to change the base?
Add version argument #301
Conversation
It can be used to download old OSM extracts from Geofabrik provider. Ref #295
cc also @juanfonsecaLS1! Let me know if this implementation is ok. In that case, I will also add an example to the package's vignette (since I'm not sure how to formally create a test or an example without stressing too much Geofabrik servers). |
@@ -44,6 +44,12 @@ | |||
#' say that smaller administrative units correspond to bigger levels. If | |||
#' `NULL`, the default, the `oe_*` functions will select the highest available | |||
#' level. See Details and Examples in [oe_match()]. | |||
#' @param version The version of the OSM extract to download. The default is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great solution, and 👍 to backwards compatibility. Quick question: will this still default to not downloading new data if there's already (possibly out of date) files matching the region in the download directory?
Another question @agila5: do we and should we start adding dates to the filenames? |
IMO no since OSM data are updated almost continuously and saving each tiny difference detected in OSM files kinda defeats the purpose of storing the data. Anyway, feel free to create a new issue on that topic and we can discuss there! |
Fine by me, it' worth documenting the behaviour and stating that people need to save their own time-stamped extracts if they want versions, not something that the package does. Just to check, the behaviour is that Follow-on question: should I should probably read the diff more carefully to find out but thought it worth putting my thinking in words.. |
This is great! I think it is a good way to do it. Probably, the documentation of On the test, how about using a small file, e.g. Monaco which is less than 600 KB? Thanks for your work! |
👍 🙏 |
Will do as soon as I update the vignette (#236). Please notice that, after the current PR, we kinda have a versioning system as long as a user requires the adoption of an old (and fixed) OSM extract instead of the latest one (which is the default). For example,
Yes. When
IMO no since each fixed (and not default) OSM extract points to a different .pbf file. In fact, I see no pratical reason for re-downloading the same old pbf file since the data will be (or should be) always the same.
Done
I'm not sure since the problems are not really related to the size of the extract, but more rate limit of Geofabrik website.... Please let me know if this is clear. |
@Robinlovelace @juanfonsecaLS1 do you have any further comment after the last commits? Otherwise I will merge. |
It can be used to download old OSM extracts from Geofabrik provider. Fixes #295.
For example:
Created on 2024-11-06 with reprex v2.0.2