Skip to content
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

Issue with the 'version' feature when OSM split up a country into regions at certain point in time #308

Open
eugenividal opened this issue Jan 24, 2025 · 3 comments

Comments

@eugenividal
Copy link

eugenividal commented Jan 24, 2025

A follow-up regarding the version feature:

Sometimes, OSM divides a country into smaller regions at certain point in time. To retrieve historical data in such cases, we need to examine two web pages, the national level and, once the country is split up, the regional level.

For example, if we want historical data for Barcelona from now until 2021, we get the daya from this URL. However, for earlier data (e.g., from 2012 to 2021), we need to go to the national-level download page.

With the current feature, when this is the case, to downloading data from previous years to the area split, you have to explicitly specify the desired level (national, i.e. 2). Otherwise, the process doesn't work.

It would be helpful to either explain this issue in the vignette or enhance the feature/function to automatically determine the appropriate level based on the availability of OSM data.

@eugenividal eugenividal changed the title 'version' feature for cases where OSM splits a country into regions at certain point in time Issue with the 'version' feature when OSM split up a country into regions at certain point in time Jan 24, 2025
@Robinlovelace
Copy link
Member

Good spot Eugeni, probably a good one to document.

@Robinlovelace
Copy link
Member

I think the note could go here, or earlier in the script around line 8:

osmextract/R/get.R

Lines 47 to 52 in 13380e6

#' @param version The version of the OSM extract to download. The default is
#' "latest". Other possible values are typically specified using the format
#' YYMMDD (e.g. "200101"). The complete list of all available historic files
#' for a given extract can be browsed from the Geofabrik website (e.g.
#' <https://download.geofabrik.de/europe/italy.html> and then click on 'raw
#' directory index').

PR welcome!

@agila5
Copy link
Contributor

agila5 commented Jan 24, 2025

Or, if you want, feel free to open a new Issue and I will check it as soon as possible :)

EDIT: Sorry, I didn't notice that this was already a new issue 🤦‍♂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants