maps.chandlerswift.com/layers/states/get_data.sh

10 lines
435 B
Bash
Executable File

#!/bin/sh
for resolution in 20m 5m 500k; do
curl --silent --remote-name https://www2.census.gov/geo/tiger/GENZ2022/shp/cb_2022_us_state_${resolution}.zip
unzip cb_2022_us_state_${resolution}.zip
ogr2ogr -f GeoJSON us-states-${resolution}.geojson cb_2022_us_state_${resolution}.shp
sed -i '/^"crs":/d' us-states-${resolution}.geojson # TODO: handle this projection properly
rm cb_2022_us_state_${resolution}.*
done