Last active
August 29, 2025 23:56
-
-
Save thisisaaronland/ef1cdc8deb06febd7150a26b301086a9 to your computer and use it in GitHub Desktop.
fetch-wof.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # git clone https://github.com/whosonfirst/wof-cli.git | |
| # cd wof-cli | |
| # make cli | |
| # Note that you could skip the 'wof repos' step entirely and simply do this: | |
| # ./bin/wof emit -format geojson -iterator-uri githuborg:///tmp 'whosonfirst-data://?prefix=whosonfirst-data-admin-' | |
| # which will take a very long time and will not be terribly forgiving of errors (network, etc.) | |
| for REPO in `./bin/wof repos -prefix whosonfirst-data-admin-` | |
| do | |
| # If you have gdal with VSI support | |
| # ./bin/wof emit -format geojson -iterator-uri githuborg:///tmp 'whosonfirst-data://?prefix=${REPO}' | ogr2ogr -f Parquery ${REPO}.parquet -oo OGRGeoJSONAllowNonStandard=YES 'GeoJSONSeq:/vsisstdin/' | |
| # | |
| # or, just the boring plain-vanilla way | |
| ./bin/wof emit -format geojson -iterator-uri githuborg:///tmp 'whosonfirst-data://?prefix=${REPO}' > ${REPO}.geojsonl | |
| ogr2ogr -f Parquet ${REPO}.parquet -oo OGRGeoJSONAllowNonStandard=YES "GeoJSONSeq:${REPO}.geojsonl" | |
| rm ${REPO}.geojsonl | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment