Skip to content

Repository files navigation

HyP3 akfire-safe

Plugin for AK fire safe applications

Usage

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

pull-perimeter workflow

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.66

Where:

  • --start-date is the start date of the images in the format (YYYY-MM-DD)
  • --end-date is the end date of the images in the format (YYYY-MM-DD)
  • --extent is the bounding box in longitude and latitude coordinates in the format min_lon min_lat max_lon max_lat

feds workflow

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.66

Where:

  • --path is the path for the folder that contain the text files
  • --start-date is the start date of the images in the format (YYYY-MM-DDTHH:MM)
  • --end-date is the end date of the images in the format (YYYY-MM-DDTHH:MM)
  • --extent is the bounding box in longitude and latitude coordinates in the format min_lon min_lat max_lon max_lat

gather workflow

To obtain Landsat data, use the gather command line tool with the following structure:

python -m hyp3_akfire_safe ++process gather \
  --scene-name LC09_L1GT_153230_20250928_20250928_02_T2 \
  --aoi-db AlaskaFireHistory_Polygons_AKAlbersNAD83_geojson_24_25.geojson \
  --points-db AlaskaFireHistory_Points_NAD83_geojson_24_25.geojson \
  --fire-season 2025 \
  --bands-pols 7 8

To obtain OPERA-S1 RTC data, use the gather command line tool with the following structure:

python -m hyp3_akfire_safe ++process gather \
  --scene-name OPERA_L2_RTC-S1_T014-028598-IW2_20250704T155521Z_20250711T083409Z_S1A_30_v1.0 \
  --aoi-db AlaskaFireHistory_Polygons_AKAlbersNAD83_geojson_24_25.geojson \
  --points-db AlaskaFireHistory_Points_NAD83_geojson_24_25.geojson \
  --fire-season 2025 \
  --bands-pols VV VH

To obtain Sentinel-2 data, use the gather command line tool with the following structure:

python -m hyp3_akfire_safe ++process gather \
  --scene-name S2C_5WMP_20250711_0_L2A \
  --aoi-db AlaskaFireHistory_Polygons_AKAlbersNAD83_geojson_24_25.geojson \
  --points-db AlaskaFireHistory_Points_NAD83_geojson_24_25.geojson \
  --fire-season 2025 \
  --bands-pols 4 5

To obtain VIIRS data, use the gather command line tool with the following structure:

python -m hyp3_akfire_safe ++process gather \
  --scene-name VJ102IMG.A2025186.0018.021.2025186064838 \
  --aoi-db AlaskaFireHistory_Polygons_AKAlbersNAD83_geojson_24_25.geojson \
  --points-db AlaskaFireHistory_Points_NAD83_geojson_24_25.geojson \
  --bands-pols 1 2

Where:

  • --scene-name is the name of the LANDSAT scene
  • --aoi-db is the AOI database file path
  • --points-db is the points database file path
  • --fire-season is the year of the fire season
  • --bands are the bands to extract

Important

Credentials are necessary to access Landsat data. See the Credentials section for more information.

Credentials

Generally, credentials are provided via environment variables, but some may be provided by command-line arguments or via a .netrc file.

AWS Credentials

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

Developer Setup

  1. Ensure that conda is installed on your system (we recommend using mambaforge to reduce setup times).
  2. Download a local version of the hyp3-akfire-safe repository (git clone https://github.com/ASFHyP3/hyp3-akfire-safe.git)
  3. In the base directory for this project call mamba env create -f environment.yml to create your Python environment, then activate it (mamba activate hyp3-akfire-safe)
  4. 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 .

Contributing

Contributions to the HyP3 akfire-safe plugin are welcome! If you would like to contribute, please submit a pull request on the GitHub repository.

Contact Us

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

About

Plugin for akfire-safe workflows

Resources

Code of conduct

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages