Say I have these two GeoTIFFs:

(you can get the GeoTIFFs if you click on the Export tab)

I'd like to create a single tile layer using both of them but gdal2tiles only appears to only work on one file at a time? I mean, I guess I could just copy the files from each tile set into a shared directory but there-in lies another problem: the files overlap. Like even if I remove the overlap myself the files themselves could still overlap. Like when running gdal2tiles for both I get a 19\119802\308424.png for both images:

enter image description here enter image description here

Maybe the best option here is to identify all the duplicate files and to by hand merge each one of them in Adobe Photoshop or some such? Or maybe there's a way for gdal2tiles to fill in the transparent parts of one with the transparent parts of the other?

1 Answer 1


Create a VRT file with gdalbuildvrt https://gdal.org/programs/gdalbuildvrt.html#gdalbuildvrt. Then you can run gdal2tiles against the VRT. On the overlapping part the latter file in the VRT will be rendered last so that will be what shows in the tile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.