Manual page for gdal2tiles.py
NOTE: This manual page is available at http://www.gdal.org/gdal2tiles.html
Usage tips and FAQ
Creating one KMZ file from generated structure
You need to zip (by zip, pkzip, WinZip, ...) content of the generated directory the way, that doc.kml is directly available in the root of zip. Then rename .zip to .kmz and whole pyramid structure is available as one huge file. Google Earth should open such file without troubles.
If you need to publish the map online, it is better to upload generated structure directly as it was generated, then tiles are requested separately and users don't need to wait for dowload of the whole map. One huge KMZ is nice for CD-ROM distribution for example.
Why KML generator needs raster files with EPSG:4326 projection?
Google Earth expect raster tiles in this projection. You can use gdalwarp utility from GDAL (or FWTools) to warp your existing rasters into EPSG:4326. If you are sure, that your raster internally use correct coordinates, but gdal2tiles.py does not generate KML files, then use -forcekml parameter.
File with name doc.kml is generated always. It is for local computer usage and for KMZ. If you would like to generate Google Earth KML Superoverlay for distributing online, then specify -publishurl parameter and another kml file (with the file name same like output_dir) is generated. This KML file you can send by email or publicly linked, it should contain correct url for published tiles.
Can I use tiles as overlay on Google Maps?
Not yet. For this functionality TMS global-* profiles need to be implemented. It is on the TODO list (any support is welcome ;-)). If you would like to generate overlays from vector data, then use Mapnik Project
Project web site
This utility was created as a project GDAL2Tiles in Google Summer of Code 2007.