Created
December 9, 2013 16:18
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.tileLayer('natural-earth-ii/{z}/{x}/{y}.png', { | |
maxZoom: 9, | |
tms: true | |
}).addTo(map); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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