Rindcalc is an open source python library built on NumPy and GDAL with the goal of providing seamless raster index calculations and composites of satellite imagery for remote sensing. It looks to fill the gap left by proprietary softwares and open source initiatives alike when it comes to the need to create and process spectral index raster files.
Landsat-8 Index raster creation Composites Cloud Masking National Agricultural Imagery Program - NAIP Index raster creation Composites Sentinel-2 - WIP MODIS - WIP
import rindcalc as rc # set inputs and outputs input_naip = '/naip_folder/m_3008101_ne_17_1_20151017.tif' output_arvi = '/naip_outputs/ARVI_3008101_ne_17.tif' data = rc.NAIP(path) data.ARVI(output_ndvi)
import rindcalc as rc import matplotlib.pyplot as plt ls = '/landsat_8/2019_11_28' index = ls.AWEIsh('/landsat_8/2019_11_28') plt.imshow(index, 'ocean') plt.title('AWEIsh - Water Index') plt.show()
from rindcalc import Landsat ls = rc.Landsat('/landsat_8/LC08_L1TP_197031_20131212_20170428_01_T1') ls.composite(['band_5', 'band_4', 'band_3'], '/landsat_8_outputs/FalseColor_Barcelona.tif')
PyPI repository
pip install rindcalc
Conda Cloud
conda install -c rindcalc rindcalc
For latest version clone the Rindcalc GitHub Repository and add the module to path with sys.path.append.
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-8 scene composite created with rindcalc RGB composite function.
rindcalc.
Landsat
ARVI
Calculates ARVI index
equation – Output array of the generated index.
array
AWEInsh
Calculates AWEInsh index
AWEIsh
” Calculates AWEIsh index
EBBI
Calculates EBBI index
GNDVI
Calculates GNDVI index
MNDWI
Calculates MNDWI index
NBLI
Calculates NBLI index
NBRI
Calculates NBRI index
NDBI
Calculates NDBI index
NDBaI
Calculates NDBaI index
NDMI
Calculates NDMI index
NDVI
Calculates NDVI index
SAVI
Calculates SAVI index
UI
Calculates UI index
VARI
Calculates VARI index
__init__
Class to read and write Landsat-8 data from.
path
Dictionary of the path for each Landsat-8 band.
bands
Dictionary of arrays for the bands chosen to load.
band_options
List of all options for band input names.
composite
Creates a three band composite out of the specified bands.
load_bands
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.
The National Agriculture Imagery Program (NAIP) acquires aerial imagery during the agricultural growing seasons in the continental U.S. A primary goal of the NAIP program is to make digital ortho photography available to governmental agencies and the public within a year of acquisition.
The default spectral resolution is natural color (Red, Green and Blue, or RGB) but beginning in 2007, some states have been delivered with four bands of data: RGB and Near Infrared (USDA).
NAIP
RedRatio
Class to read and write NAIP data from.
Sentinel
Calculates AWEIsh index
IRECI
Calculates IRECI index
MCARI
Calculates MCARI index
MTCI
Calculates MTCI index
NDI45
Calculates NDI45 index
PSSR
Calculates PSSR index
S2REP
Calculates S2REP index
SIPI
Calculates SIPI index
Class to read and write Sentinel-2 data from.
Dictionary of the path for each Sentinel-2 band.
rindcalc.utils.resample.
resample
Utility function to resample a raster and output it as either an array or TIFF
resampled array
rindcalc.utils.gen_stats.
gen_stats
Prints minimum, maximum, mean, median, and standard deviation values for a raster.
All index formulas are grouped by specific use here.
Indices designed for water detection
Indices designed for vegetation detection
Indices designed for urban and landscape detection
Indices designed for fire and burned area detection
Owen Smith
Project GitHub: rindcalc
Email: ocsmit7654@ung.edu