Examples

Browse Products

# All latest products (cached locally)
prods = Landfire.products()
32-element Vector{Landfire.Product}:
 Product: 13 Anderson Fire Behavior Fuel Models Fuels LF2024_FBFM13, LF2024 conus ak hi All
 Product: 40 Scott and Burgan Fire Behavior Fuel Models Fuels LF2024_FBFM40, LF2024 conus ak hi All
 Product: Aspect Topographic LF2020_Asp, LF2020 conus ak hi All
 Product: Biophysical Settings Vegetation LF2023_BPS, LF2023 conus ak hi 
 Product: Canadian Forest Fire Danger Rating System Fuels LF2024_CFFDRS, LF2024 conus ak hi 
 Product: Elevation Topographic LF2020_Elev, LF2020 conus ak hi All
 Product: Existing Vegetation Cover Vegetation LF2024_EVC, LF2024 conus ak hi All
 Product: Existing Vegetation Height Vegetation LF2024_EVH, LF2024 conus ak hi All
 Product: Existing Vegetation Type Vegetation LF2024_EVT, LF2024 conus ak hi All
 Product: Final Annual Disturbance Disturbance LF2024_Dist24, LF2024 conus ak hi All
 ⋮
 Product: National Vegetation Classification Vegetation LF2016_NVC, LF2016 conus ak hi All
 Product: Operational Roads Transportation LF2023_Roads, LF2023 conus ak hi All
 Product: Percent Fire Severity Fire Regime LF2023_PFS, LF2023 conus ak hi 
 Product: Preliminary Annual Disturbance Disturbance LF2024_PDist24, LF2024 conus ak hi All
 Product: Slope Degrees Topographic LF2020_SlpD, LF2020 conus ak hi All
 Product: Slope Percent Rise Topographic LF2020_SlpP, LF2020 conus ak hi All
 Product: Succession Classes Vegetation LF2024_SClass, LF2024 conus ak hi All
 Product: Vegetation Condition Class Vegetation LF2024_VCC, LF2024 conus ak hi All
 Product: Vegetation Departure Index Vegetation LF2024_VDep, LF2024 conus ak hi All
# Filter by theme
Landfire.products(theme="Fuel")
12-element Vector{Landfire.Product}:
 Product: 13 Anderson Fire Behavior Fuel Models Fuels LF2024_FBFM13, LF2024 conus ak hi All
 Product: 40 Scott and Burgan Fire Behavior Fuel Models Fuels LF2024_FBFM40, LF2024 conus ak hi All
 Product: Canadian Forest Fire Danger Rating System Fuels LF2024_CFFDRS, LF2024 conus ak hi 
 Product: Forest Canopy Base Height Fuels LF2024_CBH, LF2024 conus ak hi All
 Product: Forest Canopy Bulk Density Fuels LF2024_CBD, LF2024 conus ak hi All
 Product: Forest Canopy Cover Fuels LF2024_CC, LF2024 conus ak hi All
 Product: Forest Canopy Height Fuels LF2024_CH, LF2024 conus ak hi All
 Product: Fuel Characteristic Classification System Fuelbeds Fuels LF2023_FCCS, LF2023 conus ak hi All
 Product: Fuel Disturbance Fuels LF2024_FDist, LF2024 conus ak hi All
 Product: Fuel Vegetation Cover Fuels LF2024_FVC, LF2024 conus ak hi All
 Product: Fuel Vegetation Height Fuels LF2024_FVH, LF2024 conus ak hi All
 Product: Fuel Vegetation Type Fuels LF2024_FVT, LF2024 conus ak hi All
# Filter by layer name
Landfire.products(layer="FBFM13", conus=true)
1-element Vector{Landfire.Product}:
 Product: 13 Anderson Fire Behavior Fuel Models Fuels LF2024_FBFM13, LF2024 conus ak hi All

Attribute Tables

# Download and parse the FBFM13 attribute table
table = Landfire.attribute_table("FBFM13")
first(table, 5)
5-element Vector{@NamedTuple{VALUE::SubString{String}, FBFM13::SubString{String}, R::SubString{String}, G::SubString{String}, B::SubString{String}, RED::SubString{String}, GREEN::SubString{String}, BLUE::SubString{String}}}:
 (VALUE = "-9999", FBFM13 = "Fill-NoData", R = "255", G = "255", B = "255", RED = "1", GREEN = "1", BLUE = "1")
 (VALUE = "1", FBFM13 = "FBFM1", R = "255", G = "255", B = "190", RED = "1", GREEN = "1", BLUE = "0.745098")
 (VALUE = "2", FBFM13 = "FBFM2", R = "255", G = "255", B = "0", RED = "1", GREEN = "1", BLUE = "0")
 (VALUE = "3", FBFM13 = "FBFM3", R = "230", G = "197", B = "11", RED = "0.901961", GREEN = "0.772549", BLUE = "0.043137")
 (VALUE = "4", FBFM13 = "FBFM4", R = "255", G = "211", B = "127", RED = "1", GREEN = "0.827451", BLUE = "0.498039")

Full Product Downloads

# Get URL for a full regional product download
url = Landfire.full_product_url("FBFM13", "CONUS", 2024)
"https://landfire.gov/data-downloads/CONUS_LF2024/LF2024_FBFM13_CONUS.zip"
# Check file size before downloading
size = Landfire.filesize(url)
@info "FBFM13 CONUS download size" Base.format_bytes(size)
Info: FBFM13 CONUS download size
  Base.format_bytes(size) = "2.377 GiB"

Create a Dataset

# Define area of interest (Boulder, CO area)
# Format: "xmin ymin xmax ymax" in WGS84
aoi = "-105.5 39.9 -105.2 40.1"

fbfm13 = Landfire.products(layer="FBFM13", conus=true)

# Create a Dataset (lazy - doesn't download yet)
data = Landfire.Dataset(fbfm13, aoi)
Landfire.Dataset
 Area of Interest: -105.5 39.9 -105.2 40.1
 - Product: 13 Anderson Fire Behavior Fuel Models Fuels LF2024_FBFM13, LF2024 conus ak hi All

To actually download and extract the data:

# Download and extract (results are cached)
tif_file = get(data)

# List all extracted files
Landfire.files(data)