[GIS] GDAL: How to build an image pyramid starting from the base

gdalimage-pyramids

Normally I would create an Image Pyramid using gdal_retile.py on one large image or a set of large images.

I want to do the opposite. I have all the zoomed in tiles on the base level and I want to build (mosaic) my tiles into the rest of the levels required to build a pyramid. As GIS-Jonathan assumes I want to have the lower resolution tiles for zooming out.

                      ^      <- I want these
                     /_\     <-      :
                    /___\    <-      :
                   /_____\   <-      :
                  /_______\  <- I want these
                 /_________\ <- I have this level!

Can this be done using GDAL or similar?

I guess this would be the same as interupting gdal_retile.py just when the lowest level is finished and telling it to continue from the next level. But I don't know if this is possible?

Best Answer

a little bit complicated but you can do as follows:

  1. Merge all the tiles by making larger pieces.

  2. make all pieces coordinated with gdal_translate.

  3. create .vrt (Virtual Dataset) file with gdalbuildvrt from all coordinated pieces.

  4. use gdal2tiles for creating lower level tiles from your vrt file.

i hope it helps you...

Related Question