Skip to content

Instantly share code, notes, and snippets.

@shreyansb
Created February 26, 2015 21:06
Show Gist options
  • Save shreyansb/081b72580df2e08ef2c5 to your computer and use it in GitHub Desktop.
Save shreyansb/081b72580df2e08ef2c5 to your computer and use it in GitHub Desktop.
Converting Natural Earth's small scale land polygons to TopoJSON
brew install gdal
sudo npm install -g topojson
sudo npm install -g http-server
mkdir -p /socratic/geojson
cd /socratic/geojson
mkdir static static/shp static/json static/scripts
wget http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip -P static/shp/
unzip static/shp/ne_110m_land.zip -d static/shp/ne_110m_coastline
ogr2ogr -f GeoJSON static/json/landgeo.json static/shp/ne_110m_land/ne_110m_land.shp
topojson -o static/json/landtopo.json static/json/landgeo.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment