feat: Add download_all_layers function#380
Conversation
- Add new function to download all available geobr layers at once - Support GeoJSON (default) and GPKG output formats - Add comprehensive tests for the new functionality - Implement proper error handling for invalid drivers
|
Thanks for the PR, @popogis24 . I'm not sure, though, this is function we should have. What exactly is the use case here ? |
|
The main use case for this function is to streamline the process of downloading all available geobr layers in a single step, ensuring users have a local copy of the complete dataset without needing to call multiple functions manually. For example, I have a system that requires a spatial database to be always up to date, and this function would help me ensure that the latest data is downloaded automatically, without needing to do it manually. |
|
the data sets in geobr are not fully stable yet. Hence we use temporary cache that only lives within each session; untill we fix this, we strongly do not recommend storing geobr data locally because some data sets might be updated / fixed every now and then |
|
okay. btw, I created tunned-geobr (it's just a fork with new scripts for more layers) if you want to take a look. It simply downloads data from the original sources to a temporary folder and returns it as a geopandas or dask-geopandas DataFrame (for some layers). I also added a lot of new layers, all scraped individually with custom logic. |
|
Hi @popogis24 , the {geobr} package is led by myself and my team at Ipea but it is essentially and open project and we are glad to receive contributions from the community. In fact, the Python version of {geobr} was originally a community contribution ! I am sure some of the layers you're working with could be well incorporated into {geobr}, you would like to contribute to the package. |
Add download_all_layers function
This PR adds a new function that allows users to download all available geobr layers at once.
Features
download_all_layersfunction that downloads all available layers using their default yearsExample Usage