Add US Census Bureau layers
This commit is contained in:
parent
77ff710b0d
commit
0b88a77b15
5 changed files with 168 additions and 1 deletions
17
layers/census-bureau/get_data.sh
Executable file
17
layers/census-bureau/get_data.sh
Executable 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?
|
||||
Loading…
Add table
Add a link
Reference in a new issue