Skip to content

Instantly share code, notes, and snippets.

@jczaplew
Last active August 29, 2015 14:15
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jczaplew/6dfb340add8a6e362eee to your computer and use it in GitHub Desktop.
Save jczaplew/6dfb340add8a6e362eee to your computer and use it in GitHub Desktop.
Get Macrostrat columns + GMUS geometry for Michigan Basin
  1. Save get_data.sh
  2. chmod +x get_data.sh
  3. ./get_data.sh
  4. This will produce a folder columns that contains a shapefile of all Macrostrat column geometry, and a folder mibasin that contains a shapefile of the GMUS data for the Michigan Basin
curl "http://dev.macrostrat.org/api/columns?all&format=geojson_bare" -o columns.json
mkdir columns
ogr2ogr -skipfailures -f "ESRI Shapefile" columns/columns.shp columns.json
curl "http://dev.macrostrat.org/api/geologic_units/intersection?shape=POLYGON((-86.8%2041.3,%20-86.8%2045.7,%20-82.2%2045.7,%20-82.2%2041.3,%20-86.8%2041.3))&type=gmus&buffer=0&format=geojson_bare" -o mibasin.json
mkdir mibasin
ogr2ogr -skipfailures -f "ESRI Shapefile" mibasin/mibasin.shp mibasin.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment