NAIP

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).

class rindcalc.NAIP(path)
__init__(path)

Class to read and write NAIP data from.

Parameters:path (str) – Path to folder where Sentinel-2 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)

Calculates NDVI index

Parameters:out_raster (str, optional) – Output filepath for calculated TIFF.
Returns:equation – Output array of the generated index.
Return type:array
ARVI(out_raster=None)

Calculates ARVI index

Parameters:out_raster (str, optional) – Output filepath for calculated TIFF.
Returns:equation – Output array of the generated index.
Return type:array
VARI(out_raster=None)

Calculates VARI index

Parameters:out_raster (str, optional) – Output filepath for calculated TIFF.
Returns:equation – Output array of the generated index.
Return type:array
SAVI(soil_brightness=0.5, out_raster=None)

Calculates SAVI index

Parameters:
  • soil_brightness (float) – Soil brightness factor to compute SAVI with. Defaults to 0.5
  • out_raster (str, optional) – Output filepath for calculated TIFF.
Returns:

equation – Output array of the generated index.

Return type:

array

RedRatio(out_raster=None)

Calculates ARVI index

Parameters:out_raster (str, optional) – Output filepath for calculated TIFF.
Returns:equation – Output array of the generated index.
Return type:array