3

I have a GeoTiff raster with 1461 bands, each band representing 1 day for a total of 4 years. Basically, the geotiff is just a collection of 1461 images.

What would be the best option to animate this GeoTiff that shows all bands in succession? Ideally I want to show 24 bands (24 frames sequentially) per second in my video/gif.

1

A bit of a roundabout method, but here's what worked for me:

  • Make a shell script w/ gdal_translate to extract all bands as separate .tif files

    gdal_translate -b <bandnum> in.tif out<bandnum>.tif

  • (Optional) For my case I needed to apply a custom colormap to each .tif file, so I used MultiQML + Qgis console. Output:colored<bandnum>.tif

  • Another shell script w/ gdal_translate to convert the .tif files to .jpg

    gdal_translate -of JPEG -co worldfile=yes colored<bandnum>.tif out<bandnum>.jpg

  • Finally, imageio to make .gif from .jpg files (fps=24). Taken from this answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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