remotior_sensus.tools.raster_report module
Raster report.
This tool allows for the calculation of a report providing information extracted from a raster.
Typical usage example:
>>> # import Remotior Sensus and start the session
>>> import remotior_sensus
>>> rs = remotior_sensus.Session()
>>> # start the process
>>> report = rs.raster_report(raster_path='file.tif',output_path='report.csv')
- remotior_sensus.tools.raster_report.raster_report(raster_path: str, output_path: None | str = None, nodata_value: None | int = None, extent_list: list | None = None, n_processes: None | int = None, available_ram: None | int = None, progress_message: bool | None = True) OutputManager
Calculation of a report providing information extracted from a raster.
This tool allows for the calculation of a report providing information such as pixel count, area per class and percentage of the total area. The output is a csv file. This tool is intended for integer rasters.
- Parameters:
raster_path – path of raster used as input.
output_path – string of output path.
nodata_value – value to be considered as nodata.
extent_list – list of boundary coordinates left top right bottom.
n_processes – number of parallel processes.
available_ram – number of megabytes of RAM available to processes.
progress_message – if True then start progress message, if False does not start the progress message (useful if launched from other tools).
- Returns:
- object
OutputManager()
with path = output path
- object
Examples
- Perform the report of a raster
>>> raster_report(raster_path='file.tif',output_path='report.csv')