一、参考资料
https://commenthol.github.io/leaflet-rastercoords/
https://github.com/commenthol/gdal2tiles-leaflet
https://www.jianshu.com/p/2372fe239130
https://github.com/commenthol/gdal2tiles-leaflet/blob/master/gdal2tiles.py
https://www.jianshu.com/p/3b3efa92dd6d
二、安装软件
T1-python-2.7.11.msi
T2-reg.py
T3-PIL-1.1.7.win32-py2.7.exe
T4-gdal-111-1800-core.msi
T5-numpy-1.8.1-win32-superpack-python2.7.exe
T6-GDAL-1.11.4.win32-py2.7.msi
三、配置测试
1、添加GDAL目录到Path变量
2、添加GDAL_DATA目录后重启
3、在python命令验证GDAL能否正确引用
四、切图
1、为leaflet切图,需要指明-l --leaflet参数,因为切片顺序Y轴反转
2、下载最新的gdal2tiles.py,拷贝到GDAL目录,最新的支持为Leaflet切图
3、命令:
python gdal2tiles2.py -l --leaflet -p raster -z 0-8 -w none 20170315-2.jpg G: iles2