Skip to content

Instantly share code, notes, and snippets.

@acdha
Created December 9, 2013 16:18
Show Gist options
  • Save acdha/7875005 to your computer and use it in GitHub Desktop.
Save acdha/7875005 to your computer and use it in GitHub Desktop.
Quick and dirty script to convert Natural Earth II GeoTIFF from http://www.naturalearthdata.com/ into map tiles for display with LeafletJS
L.tileLayer('natural-earth-ii/{z}/{x}/{y}.png', {
maxZoom: 9,
tms: true
}).addTo(map);
PYTHONPATH=/usr/local/Cellar/gdal/1.10.1/lib/python2.7/site-packages/ nice -20 gdal2tiles.py --s_srs=EPSG:4326 -r lanczos --zoom="1-9" ~/Downloads/NE2_HR_LC_SR_W_DR/NE2_HR_LC_SR_W_DR.tif -w none natural-earth-ii/
# Upload to S3/CloudFiles/etc. here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment