mnp.species_models.species_geo_map

Module Contents

Classes

SpeciesGeomapLogger

Class for holding log messages until the SpeciesModel asks for them. This is done because logging to a file does not go well when using multiple processes due to write conflicts.

SpeciesGeoMap

Parent class for geospatial rasters pertaining to species. Implements loading the geospatial profile and saving as .tif

API

class mnp.species_models.species_geo_map.SpeciesGeomapLogger

Class for holding log messages until the SpeciesModel asks for them. This is done because logging to a file does not go well when using multiple processes due to write conflicts.

Initialization

info(message: str)
warning(message: str)
error(message: str)
class mnp.species_models.species_geo_map.SpeciesGeoMap(geospatial_profile: rasterio.profiles.DefaultGTiffProfile, output_path: str = '')

Parent class for geospatial rasters pertaining to species. Implements loading the geospatial profile and saving as .tif

Initialization

geospatial_profilerio.profiles.DefaultGTiffProfile

profile of the geospatial raster file

output_pathstr

path to save or read raster fil from or to, without extension

save_raster(nodata_value='auto', band_description: str = None, **kwargs)

Save the hsi map for this species

nodata_valuestr or int, optional

NoData value for the raster. If ‘auto’, it will be determined based on the array contents.

band_descriptionstr, optional

Description of the band in the raster file.

**kwargsdict

Additional keyword arguments to pass to the update_tags method of the rasterio dataset.

file_exists()

Check if file already exists and return True or False

boolean indicating file exists or not

read_from_file()

Read raster from file.

boolean indicating raster was read or not