Reputation: 501
I am currently trying to use leaflet to display images (jpeg or png) instead of maps, I have followed the instructions on this blog post to create the tiles using gdal2tiles.py here is the code we used
gdal2tile.py -p raster -z 0-5 -w none "SOURCE_PATH.png" "DESTINATION_FOLDER"
The command produces the necessary tiles for leaflet, but the problem is that it takes around 2 minutes to create tiles for the attached image (size: 777KB, resolution: 2592x1728) and a disastrous number of tiles of around 1600 file.
I am trying to optimize the time and number of files to generate tiles for leaflet and looking for suggestions, please help.
Upvotes: 0
Views: 912
Reputation: 27103
Like the blog post explains, your image's resolution is too low to zoom further than 3 times. So change that to 0-3 and you'll see things speed up considerably.
Upvotes: 1