Borrar filtros
Borrar filtros

How to read GeoTiff with multiple images?

8 visualizaciones (últimos 30 días)
Israel Olmos Lau
Israel Olmos Lau el 15 de Ag. de 2018
Respondida: Chad Greene el 15 de Ag. de 2018
I am writing some functions to read in GeoTiff files in chronological order. I have come upon an error message when using the geotiffread function with certain files:
>> m=geotiffread('LC08_L1GT_123108_20170115_20170311_01_T2.tif')
Error using geotiffinfo>readinfo (line 261)
Multiple images exist in the file and their sizes are different.
Up until that point I did not know .tiff files could contain more than one image. When opening the suspect files with another document viewer I saw that indeed certain files are comprised of 8-12 images (all of different sizes), only one of which (the first one) I need. Looking up the documentation for
geotiffread
I came upon the syntax for working with multi image .tiff files using indexing but still get the same error. It appears the error occurs in the geotiffinfo function. I can load the image using
imread
but that does not load in the georeferencing object which is crucial for my project. Is there anyway around this error? Is there some Matlab functions for editing .tiff files so as to extract only the first image of the file along with the geo tags?
I am hoping I can do this without manually changing each file as there are many images I have to process...
Thank you!

Respuestas (1)

Chad Greene
Chad Greene el 15 de Ag. de 2018
Maybe you can use imread and then use geotiffinfo for the georeferencing information?

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by