Add US Census Bureau layers

This commit is contained in:
Chandler Swift 2023-07-25 21:34:19 -05:00
parent 77ff710b0d
commit 0b88a77b15
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F
5 changed files with 168 additions and 1 deletions

View file

@ -0,0 +1,17 @@
#!/bin/sh
for resolution in 20m 5m; do
curl --silent --remote-name https://www2.census.gov/geo/tiger/GENZ2022/shp/cb_2022_us_county_${resolution}.zip
unzip cb_2022_us_county_${resolution}.zip
ogr2ogr -f GeoJSON us-counties-${resolution}.geojson cb_2022_us_county_${resolution}.shp
sed -i '/^"crs":/d' us-counties-${resolution}.geojson # TODO: handle this projection properly
rm cb_2022_us_county_${resolution}.*
# python cleanup_data.py us-counties-${resolution}.geojson # Only needed for KML files
done
curl --silent --remote-name https://www2.census.gov/geo/tiger/GENZ2022/shp/cb_2022_us_unsd_500k.zip
unzip cb_2022_us_unsd_500k.zip
ogr2ogr -f GeoJSON us-school-districts.geojson cb_2022_us_unsd_500k.shp
sed -i '/^"crs":/d' us-school-districts.geojson # TODO: handle this projection properly
rm cb_2022_us_unsd_500k.*
# TODO: some kind of cleanup to save space?