Examples

Browse Products

# All latest products (cached locally)
prods = Landfire.products()
33-element Vector{Landfire.Product}:
 Product: 13 Anderson Fire Behavior Fuel Models Fuels 250FBFM13, 2.5.0 conus ak hi All
 Product: 40 Scott and Burgan Fire Behavior Fuel Models Fuels 250FBFM40, 2.5.0 conus ak hi All
 Product: Aspect Topographic ASP2020, 2.2.0 conus ak hi All
 Product: Biophysical Settings Vegetation 240BPS, 2.4.0 conus ak hi 
 Product: Canadian Forest Fire Danger Rating System Fuels 250CFFDRS, 2.5.0 conus ak hi 
 Product: Elevation Topographic ELEV2020, 2.2.0 conus ak hi All
 Product: Existing Vegetation Cover Vegetation 250EVC, 2.5.0 conus ak hi All
 Product: Existing Vegetation Height Vegetation 250EVH, 2.5.0 conus ak hi All
 Product: Existing Vegetation Type Vegetation 250EVT, 2.5.0 conus ak hi All
 Product: Final Annual Disturbance Disturbance DIST2024, 2.5.0 conus ak hi All
 ⋮
 Product: National Vegetation Classification Vegetation 200NVC, 2.0.0 conus ak hi All
 Product: Operational Roads Transportation 240ROADS_23, 2.4.0 conus ak hi All
 Product: Percent Fire Severity Fire Regime 240PFS, 2.4.0 conus ak hi 
 Product: Preliminary Annual Disturbance Disturbance PDIST2024, 2.5.0 conus ak hi All
 Product: Slope Degrees Topographic SLPD2020, 2.2.0 conus ak hi All
 Product: Slope Percent Rise Topographic SLPP2020, 2.2.0 conus ak hi All
 Product: Succession Classes Vegetation 250SCLASS, 2.5.0 conus ak hi All
 Product: Vegetation Condition Class Vegetation 250VCC, 2.5.0 conus ak hi All
 Product: Vegetation Departure Index Vegetation 250VDEP, 2.5.0 conus ak hi All
# Filter by theme
Landfire.products(theme="Fuel")
12-element Vector{Landfire.Product}:
 Product: 13 Anderson Fire Behavior Fuel Models Fuels 250FBFM13, 2.5.0 conus ak hi All
 Product: 40 Scott and Burgan Fire Behavior Fuel Models Fuels 250FBFM40, 2.5.0 conus ak hi All
 Product: Canadian Forest Fire Danger Rating System Fuels 250CFFDRS, 2.5.0 conus ak hi 
 Product: Forest Canopy Base Height Fuels 250CBH, 2.5.0 conus ak hi All
 Product: Forest Canopy Bulk Density Fuels 250CBD, 2.5.0 conus ak hi All
 Product: Forest Canopy Cover Fuels 250CC, 2.5.0 conus ak hi All
 Product: Forest Canopy Height Fuels 250CH, 2.5.0 conus ak hi All
 Product: Fuel Characteristic Classification System Fuelbeds Fuels 240FCCS, 2.4.0 conus ak hi All
 Product: Fuel Disturbance Fuels 250FDIST, 2.5.0 conus ak hi All
 Product: Fuel Vegetation Cover Fuels 250FVC, 2.5.0 conus ak hi All
 Product: Fuel Vegetation Height Fuels 250FVH, 2.5.0 conus ak hi All
 Product: Fuel Vegetation Type Fuels 250FVT, 2.5.0 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 250FBFM13, 2.5.0 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 250FBFM13, 2.5.0 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)