Skip to content

Instantly share code, notes, and snippets.

@morganherlocker
Created April 14, 2014 15:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save morganherlocker/10658746 to your computer and use it in GitHub Desktop.
Save morganherlocker/10658746 to your computer and use it in GitHub Desktop.
hypothetical gis cli

unixy gis

Create a 5 mile buffer around all households, merge the polygons, and output a geojson file representing populated areas.

cat households.geojson |
turf_buffer --distance 5 --units "miles" |
turf_merge >
populated_areas.geojson

Crunch some stats on counties, given block census data.

cat counties.geojson |
turf_sum --points block_points.geojson --z "population" --out_field "population_sum" |
turf_avg --points block_points.geojson --z "median_income" --out_field "median_income_avg" |
geocolor --classification "quantiles" --z "median_income_avg" --breaks 5 --colors red,yellow,green |
geojsonio

Create a contour map given a set of elevation points, then pipe the results into geojson.io

cat elevation_pts.geojson |
turf-isolines --z "elevation" --resolution 40 --breaks 0,500,2000,5000,10000 |
geojsonio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment