RSGISLib Sensor Tools

Landsat

rsgislib.tools.sensors.read_landsat_mtl_to_dict(in_mtl_file)

A function which can read a Landsat MTL header file and return a structured dict with the information from the MTL file.

Parameters

in_mtl_file – the file path to MTL header file (*MTL.txt)

Returns

dict structure.

import pprint
import rsgislib.tools.sensors

ls_header = rsgislib.tools.sensors.read_landsat_mtl_to_dict("landsat_MTL.txt")
pprint.pprint(ls_header)