File Exchange

image thumbnail


version (4.16 KB) by Mohammad Abouali
loading LandSat images using the metadata


Updated 02 Dec 2014

View License

This file loads landSat 8 images. Instead of individual TIF images, you need to point it to the meta data.
The usage is:


Note that the input parameter is the txt file. the output, i.e. LandSatData would be a structure:

Band: {11x1 cell}
BandInfo: {11x1 cell}
BQA: [7841x7691 uint16]
BQAInfo: [1x1 struct]
MetaData: [1x1 struct]

Above commands will load all bands including BQA band. If you want to load only certain bands then issue:


In above example, only band 2, 3 and 4 are loaded. The rest would be empty. Band 12 refers to Band Quality Data or BQA. If not provided it won't be loaded.

You can make a color composite as follows:

RGB=(cat(3, LandSatData.Band{4}, LandSatData.Band{3}, LandSatData.Band{2}));

Cite As

Mohammad Abouali (2020). loadLandSat8(metaFileName,bandList) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Hi. This is a great function. How can I plot the data in geographic coordinates once it is loaded?


MATLAB Release Compatibility
Created with R2014b
Compatible with any release
Platform Compatibility
Windows macOS Linux