Skip to content

Instantly share code, notes, and snippets.

@pnavarrc
Created September 21, 2015 23:58
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 pnavarrc/582ef07fe7974ef59deb to your computer and use it in GitHub Desktop.
Save pnavarrc/582ef07fe7974ef59deb to your computer and use it in GitHub Desktop.
Map Zoom and Rotate
# Download and Transform the 1:50m Country Shapefiles from Natural Earth
# http://www.naturalearthdata.com/downloads/50m-cultural-vectors/
URL = http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/50m/cultural/ne_50m_admin_0_countries.zip
# Download the zip file from the Natural Earth server
ne_50m_admin_0_countries.zip:
curl -LO $(URL)
# Unzip the shapefiles
ne_50m_admin_0_countries.shp: ne_50m_admin_0_countries.zip
unzip ne_50m_admin_0_countries.zip
touch ne_50m_admin_0_countries.shp
# Convert the shapefiles to GeoJSON
countries.geojson: ne_50m_admin_0_countries.shp
ogr2ogr -f GeoJSON countries.geojson ne_50m_admin_0_countries.shp
# Convert the GeoJSON file to TopoJSON
countries.topojson: countries.geojson
topojson -p -o countries.topojson countries.geojson
# Remove source and temporary files
clean:
rm ne_50m_admin_0_countries*
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment