maps.chandlerswift.com/layers/national-land/get_data.sh

23 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/sh
curl --silent --output nps_boundary_geojson.zip http://gstore.unm.edu/apps/rgisarchive/datasets/7bbe8af5-029b-4adf-b06c-134f0dd57226/nps_boundary.derived.geojson
unzip nps_boundary_geojson.zip nps_boundary.geojson
rm nps_boundary_geojson.zip
# 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
# https://data.fs.usda.gov/geodata/edw/datasets.php?xmlKeyword=Original+Proclaimed+National+Forests
curl --silent --remote-name https://data.fs.usda.gov/geodata/edw/edw_resources/shp/S_USA.ProclaimedForest.zip
unzip S_USA.ProclaimedForest.zip
ogr2ogr -f GeoJSON us-national-forests.geojson S_USA.ProclaimedForest.shp
sed -i '/^"crs":/d' us-national-forests.geojson # TODO: handle this projection properly
rm S_USA.ProclaimedForest.*
# TODO: some kind of cleanup to save space?