Algorithms and tools python package for Forest Fire Research, Management and Analytics
Reason this release was yanked:
bug
Project description
Friendly graphical user interface click here
fire2a-lib python package
Fire Advanced Analyitics research group scriptable knowledge base
- Novel Algorithms related to landscape risk metrics, spatial decision optimization models, etc.
- (Cell2) Fire (W) Simulator integration algorithms to facilitating placing firebreaks, measuring forest fire impacts, etc.
- (Q)GIS algorithms to common tasks related to rasters, polygons, spatial clustering, etc.
Quickstart
Simplest: Use within QGIS
- Install QGIS
- Open QGIS Python Console
- Type (to install)::
!pip install fire2a-lib
- Visit fire2a-lib documentation, example:
from fire2a.downstream_protection_value import digraph_from_messages
digraph = digraph_from_messages('messages01.csv')
Command line usage
- Install QGIS
- Docker users check qgis container
- Linux developers could skip QGIS by
apt install python3-gdal gdal-bin
- Use python from the terminal
- Windows: Open OsGeo4W Shell app,
python
is available - MacOS: Open terminal app, use this
/Applications/QGIS.app/Contents/MacOS/bin/python
(see creating an alias below) - Linux: Do a system site packages aware python virtual environment
python3 -m venv --system-site-packages qgis_venv
- Install
python -m pip install fire2a-lib
- Visit fire2a-lib documentation, example:
python -m fire2a.cell2fire -vvv --base-raster ../fuels.asc --authid EPSG:25831 --scar-sample Grids/Grids2/F
orestGrid03.csv --scar-poly propagation_scars.shp --burn-prob burn_probability.tif
Scripting tips
- Check standalone scripting for more info on initializing a headless QGIS environment
- Usage examples
- Microsoft users check this VSCode integration
- macOS users add a permanent alias, on the terminal app
echo "alias pythonq='/Applications/QGIS.app/Contents/MacOS/bin/python'" >> ~/.zshrc
Interactive
- debbuging:
breakpoint()
from IPython import embed
embed()
- sessions, with: IPython, qtconsole, jupyter-lab, or IPyConsole (QGIS plugin) compatible
# Interactive explore from IPython
In [1]: from fire2a.<press-tab>
# Select and Copy a whole module from line 1 up -but not included- to 'def main def main(argv=None):' line
In [2]: %paste
# Choose your args
In [3]: args = arg_parser.parse_args(['-vvv', '--base-raster', ...
# Skip:
if argv is sys.argv:
argv = sys.argv[1:]
args = arg_parser(argv)
# Ready
Contributing
Building
Code of Conduct
Everyone interacting in the project's codebases, issue trackers, chat rooms, and fora is expected to follow the PSF Code of Conduct.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fire2a_lib-0.2.15.tar.gz
(752.2 kB
view hashes)
Built Distribution
fire2a_lib-0.2.15-py3-none-any.whl
(772.1 kB
view hashes)
Close
Hashes for fire2a_lib-0.2.15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | caf23210336ae5db01b17338469c671133d97b54d4ded191b0d026e7622854b6 |
|
MD5 | 2aa636c064fcb70c41f014403c3550e5 |
|
BLAKE2b-256 | f4909f071535fd067a34f300c7a6c014af27de32d2876d617b496de45e0582e4 |