Landsat-8

Rindcalc uses the standard naming convention of landsat bands, it only needs the folder in which Landsat-8 bands are contained as the input. This method allows for easy, quick, and consistent index calculations from Landsat-8 imagery.

The Landsat 8 satellite orbits the the Earth in a sun-synchronous, near-polar orbit, at an altitude of 705 km (438 mi), inclined at 98.2 degrees, and circles the Earth every 99 minutes. The satellite has a 16-day repeat cycle with an equatorial crossing time: 10:00 a.m. +/- 15 minutes.

Landsat 8 aquires about 740 scenes a day on the Worldwide Reference System-2 (WRS-2) path/row system, with a swath overlap (or sidelap) varying from 7 percent at the Equator to a maximum of approximately 85 percent at extreme latitudes. The scene size is 185 km x 180 km (114 mi x 112 mi) (USGS).

Landsat calculated with RGB composite

Landsat-8 scene composite created with rindcalc RGB composite function.


class rindcalc.Landsat(path)
__init__(path)

Class to read and write Landsat-8 data from.

Parameters:path (str) – Path to folder where Landsat-8 bands are contained.
path

Dictionary of the path for each Landsat-8 band.

Type:dict
bands

Dictionary of arrays for the bands chosen to load.

Type:dict, array
band_options

List of all options for band input names.

Type:list
load_bands(which_bands=None)

Opens and reads bands into Float 32 arrays. If no list is passed into which bands then all bands are opened and added to the dictionary self.bands.

Parameters:which_bands (list, optional) – A list of band names to open as arrays. e.g. which_bands=[‘band_1’, ‘band_2’, ‘band_3’]
Returns:self.bands – Updated self.bands dictionary
Return type:dict
composite(which_bands, out_composite)

Creates a three band composite out of the specified bands.

Parameters:
  • which_bands (list) – A list of bands to save as a three band composite. Must be in order of how the bands are to saved within the output TIFF. e.g. which_bands=[‘band_1’, ‘band_2’, ‘band_3’]
  • out_composite (str) – The output filename to save the composite,
NDVI(out_raster=None, mask_clouds=False)

Calculates NDVI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

AWEIsh(out_raster=None, mask_clouds=False)

” Calculates AWEIsh index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

AWEInsh(out_raster=None, mask_clouds=False)

Calculates AWEInsh index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

NDMI(out_raster=None, mask_clouds=False)

Calculates NDMI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

MNDWI(out_raster=None, mask_clouds=False)

Calculates MNDWI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

GNDVI(out_raster=None, mask_clouds=False)

Calculates GNDVI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

SAVI(out_raster=None, soil_brightness=0.5, mask_clouds=False)

Calculates SAVI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • soil_brightness (float) – Soil brightness factor to compute SAVI with. Defaults to 0.5
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

ARVI(out_raster=None, mask_clouds=False)

Calculates ARVI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

VARI(out_raster=None, mask_clouds=False)

Calculates VARI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

NDBI(out_raster=None, mask_clouds=False)

Calculates NDBI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

NDBaI(out_raster=None, mask_clouds=False)

Calculates NDBaI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

NBLI(out_raster=None, mask_clouds=False)

Calculates NBLI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

EBBI(out_raster=None, mask_clouds=False)

Calculates EBBI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

UI(out_raster=None, mask_clouds=False)

Calculates UI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array

NBRI(out_raster=None, mask_clouds=False)

Calculates NBRI index

Parameters:
  • out_raster (str, optional) – Output filepath for calculated TIFF.
  • mask_clouds (bool, optional) – Whether or not to apply cloud masking to output index with the QA band.
Returns:

equation – Output array of the generated index.

Return type:

array