{"id":880,"date":"2026-10-11T16:05:30","date_gmt":"2026-10-11T20:05:30","guid":{"rendered":"https:\/\/brian.digitalmaddox.com\/blog\/?p=880"},"modified":"2026-10-11T16:05:30","modified_gmt":"2026-10-11T20:05:30","slug":"quick-updates-on-misc_gis_scripts","status":"publish","type":"post","link":"https:\/\/brian.digitalmaddox.com\/blog\/?p=880","title":{"rendered":"Quick updates on misc_gis_scripts"},"content":{"rendered":"<p>I&#8217;ve had a github repo at <a href=\"https:\/\/github.com\/briangmaddox\/misc_gis_scripts\">https:\/\/github.com\/briangmaddox\/misc_gis_scripts<\/a> for a while now.\u00a0 Basically it was some simple scripts I made to download open data and load it to <a href=\"https:\/\/www.postgresql.org\/\">PostgreSQL<\/a> \/ <a href=\"https:\/\/postgis.net\/\">PostGIS<\/a>. Honestly I never gave it much love.<\/p>\n<p>Had some time last week and needed to recreate my local PostgreSQL database, so actually took the time to update that repo.\u00a0 First thing I did was add a natural_earth section and bash script to download <a href=\"https:\/\/www.naturalearthdata.com\/\">Natural Earth<\/a> data and upload it to PostGIS, both vector and using the raster extension.\u00a0 It will download everything I found interesting from their website and then upload it into cultural, physical, and raster schemas in a database.\u00a0 I just grab the 1:10m data but you can add more if you want.<\/p>\n<p>Next, I went ahead and added a new downloader to census_tiger.\u00a0 When the <a href=\"https:\/\/tigerweb.geo.census.gov\/tigerwebmain\/TIGERweb_main.html\">Census<\/a> started putting out <a href=\"https:\/\/www.geopackage.org\/\">geopackages<\/a>, I felt like I didn&#8217;t need to maintain my state-based copies of the data or scripts any more.\u00a0 But, I&#8217;ve found I like keeping that data in PostgreSQL where I can cluster it spatially and add in a lot of indices.\u00a0 I went ahead and added a loader that will download the geopackages and then upload them to PostgreSQL.\u00a0 Had to add in a key to each geopackage to prevent name collisions (there are two state outline datasets with the same name).<\/p>\n<p>Finally, I added in a downloader for the USGS <a href=\"https:\/\/www.usgs.gov\/tools\/geographic-names-information-system-gnis\">GNIS<\/a> data.\u00a0 They release it in a geopackage now with multiple layers included in that file.\u00a0 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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve had a github repo at https:\/\/github.com\/briangmaddox\/misc_gis_scripts for a while now.\u00a0 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 &hellip; <a href=\"https:\/\/brian.digitalmaddox.com\/blog\/?p=880\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":882,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[23],"class_list":["post-880","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-gis"],"_links":{"self":[{"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=880"}],"version-history":[{"count":1,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/880\/revisions"}],"predecessor-version":[{"id":881,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/880\/revisions\/881"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/882"}],"wp:attachment":[{"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}