I’ve had a github repo at https://github.com/briangmaddox/misc_gis_scripts for a while now. Basically it was some simple scripts I made to download open data and load it to PostgreSQL / PostGIS. Honestly I never gave it much love.
Had some time last week and needed to recreate my local PostgreSQL database, so actually took the time to update that repo. First thing I did was add a natural_earth section and bash script to download Natural Earth data and upload it to PostGIS, both vector and using the raster extension. It will download everything I found interesting from their website and then upload it into cultural, physical, and raster schemas in a database. I just grab the 1:10m data but you can add more if you want.
Next, I went ahead and added a new downloader to census_tiger. When the Census started putting out geopackages, I felt like I didn’t need to maintain my state-based copies of the data or scripts any more. But, I’ve found I like keeping that data in PostgreSQL where I can cluster it spatially and add in a lot of indices. I went ahead and added a loader that will download the geopackages and then upload them to PostgreSQL. Had to add in a key to each geopackage to prevent name collisions (there are two state outline datasets with the same name).
Finally, I added in a downloader for the USGS GNIS data. They release it in a geopackage now with multiple layers included in that file. The downloader grabs it and uploads the data. Since they have some auxiliary tables, it also will create views in case you want things like the naming history of a location.