The program needs to be installed in standard mode ("Standard Desktop installation").
In the second step select the site for downloading
The package GDAL should be selected and set
Run it in the mode "Advanced installation" again
Than "Install from internet"
Click "Next"
At the stage of choosing a package, open a section "Libs"
Locate the item "2.149k python-numpy: Python NumPy (Numerical) Extension" and switch it to "2.7-1.5.1-1" (in the new versions different name could be found)
If there is an error in the program that does not suffice (Library MSVCR100.DLL, is not sufficient) then take the files MSVCR100.DLL, MSVCP100.DLL and copy them to a folder C:\WINDOWS\SYSTEM32
The utility gdal2tiles by default creates an indexing under the standard OSGeo TMS (Tile Map Specification), for shaping tiles up to the standard Google OSM:
The command of bonding of all rasters in the folder test
gdalbuildvrt test.vrt -vrtnodata "255 255 255" -hidenodata -resolution highest test/*.jpg
The command of transformation TIF of files in RGB (if there is another color model in files)
gdal_translate -of vrt -expand rgba test.tif test.vrt
The command of transformation of raster in the coordinate system EPSG:4326
SK 63 - gdalwarp.exe -s_srs "+proj=tmerc +ellps=krass +lon_0=35d30E +lat_0=0d0N +k=1 +x_0=5300000 +y_0=-9214.69 +towgs84=+25,-141,-78.5,0.0,0.35,0.736,0.0" -t_srs EPSG:4326 -r bilinear test.vrt test.tif
EPSG:4326 - gdalwarp.exe -t_srs EPSG:4326 -r bilinear test.vrt test.tif (or you can skip this step)
The command of building tiles. The result will be stored in the folder test
gdal2tiles -p mercator --s_srs EPSG:4326 test.tif
For displaying tiles using the Leaflet:
TMS - L.tileLayer('http://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {tms: true});
OSM - L.tileLayer('http://{s}.somedomain.com/{foo}/{z}/{x}/{y}.png', {});