<div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all,<br>
I have a folder with a gdal2tiles output: 6 levels of zoom (and folders),<br>
with subfolders and the .png tiles.<br>
<br>
Is there a gdal tool to merge in a single geotiff file these .png tiles?<br><br></blockquote><div><br>Hi Andrea,<br> Probably the simplest way to handle this is with a virtual dataset. Rather than a direct mosaic, you create a virtual mosaic and then use gdal_translate to convert to a geotiff, e.g.<br>
<br>1)<br>gdalbuildvrt test.vrt *.png<br><br>2)<br>gdal_translate test.vrt test.tif<br><br>Simple as that. You'll want to perform this on your highest resolution tile, I'm guessing. It is good practice to provide overviews for performance sake, so run gdaladdo:<br>
<br>3)<br>gdaladdo -r average test.tif 2 4 6 8 16 32 64 128 <br><br>If you want to really optimize (and here others can probably make better recommendations) you'll want to use internal tiling when you create the tif (only applies to max resolution, but good to do nonetheless), e.g. replace step two with:<br>
<br>2)<br>gdal_translate -co "TILED=YES" test.vrt test.tif<br><br>Steve Mather<br></div></div>