pyprecag.bandops¶
-
class
pyprecag.bandops.
BandMapping
(*args, **kwargs)[source]¶ A dictionary used to manage band types and band numbers.
If it has not been set it will have the default value of 0
The list of keys is confined to those in __defaults, values must be integers.
-
__defaults = values to use as defaults
-
-
class
pyprecag.bandops.
CalculateIndices
(**kwargs)[source]¶ Functions used for validating and calculating image indices.
Parameters: () (**kwargs) – Components of the BandMapping object -
calculate
(index_name, raster, src_nodata=None, dest_nodata=-9999)[source]¶ - Using a given raster, calculate an image index. Valid indices include.
- NDVI - Normalised difference vegetation index PCD - Plant cell density index GNDVI - Green normalised difference vegetation index CHLRE - Chlorophyll red-edge index NDRE - Normalised difference red-edge index
Parameters: - index_name (str) – The name of the index to calculate options include NDVI, PCD, GNDVI, NDRE and CHLRE
- raster (str) – The input raster. This can be a filename, rasterio.io.Memoryfile or opened rasterio dataset
- src_nodata (int) – The nodata value of the image. This will only be used if the input raster has a value of None
- dest_nodata (int) – The value to use as the output no data value. If np.nan is required use None
Returns: The result of the index calculation
Return type: numpy.ndarray
-
gndvi
()[source]¶ Calculate a normalised difference vegetation index. Requires Green and InfraRed Bands
-