Plugin for AK fire safe applications
The HyP3-akfire-safe plugin provides workflows (accessible directly in Python or via a CLI) that can be used to pull/process fire perimeters or download LANDSAT images
The pull_perimeter command line tool can be run using the following structure:
python -m hyp3_akfire_safe ++process pull_perimeter \
--start-date 2025-06-01 \
--end-date 2025-08-01 \
--extent -169.01 52.37 -130.16 71.66Where:
--start-dateis the start date of the images in the format (YYYY-MM-DD)--end-dateis the end date of the images in the format (YYYY-MM-DD)--extentis the bounding box in longitude and latitude coordinates in the formatmin_lon min_lat max_lon max_lat
The feds command line tool can be run using the following structure:
python -m hyp3_akfire_safe ++process feds \
--path ./data \
--start-date 2025-06-01T00:00 \
--end-date 2025-08-01T00:00 \
--extent -169.01 52.37 -130.16 71.66Where:
--pathis the path for the folder that contain the text files--start-dateis the start date of the images in the format (YYYY-MM-DDTHH:MM)--end-dateis the end date of the images in the format (YYYY-MM-DDTHH:MM)--extentis the bounding box in longitude and latitude coordinates in the formatmin_lon min_lat max_lon max_lat
The gather_landsat command line tool can be run using the following structure:
python -m hyp3_akfire_safe ++process gather_landsat \
--start-date 2025-05-01 \
--end-date 2025-05-07 \
--location -163.97 54.756Where:
--start-dateis the start date of the images in the format (YYYY-MM-DD)--end-dateis the end date of the images in the format (YYYY-MM-DD)--locationis the longitude and latitude coordinates for the location point in the formatlon lat
Important
Credentials are necessary to access Landsat data. See the Credentials section for more information.
Generally, credentials are provided via environment variables, but some may be provided by command-line arguments or via a .netrc file.
You must provide AWS credentials because the data is hosted by USGS in a "requester pays" bucket. To provide AWS credentials, you can either use an AWS profile specified in your ~/.aws/credentials by exporting:
export AWS_PROFILE=your-profile
or by exporting credential environment variables:
export AWS_ACCESS_KEY_ID=your-id
export AWS_SECRET_ACCESS_KEY=your-key
export AWS_SESSION_TOKEN=your-token # optional; for when using temporary credentials
For more information, please see: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
- Ensure that conda is installed on your system (we recommend using mambaforge to reduce setup times).
- Download a local version of the
hyp3-akfire-saferepository (git clone https://github.com/ASFHyP3/hyp3-akfire-safe.git) - In the base directory for this project call
mamba env create -f environment.ymlto create your Python environment, then activate it (mamba activate hyp3-akfire-safe) - Finally, install a development version of the package (
python -m pip install -e .)
To run all commands in sequence use:
git clone https://github.com/ASFHyP3/hyp3-akfire-safe.git
cd hyp3-akfire-safe
mamba env create -f environment.yml
mamba activate hyp3-akfire-safe
python -m pip install -e .Contributions to the HyP3 akfire-safe plugin are welcome! If you would like to contribute, please submit a pull request on the GitHub repository.
Want to talk about HyP3 akfire-safe? We would love to hear from you!
Found a bug? Want to request a feature? open an issue