Skip to content

Remove surface fuel under roads, water and buildings

You are viewing in-progress documentation for v2. Switch to the stable version for the current production release.

A surface fuel grid built from LANDFIRE assigns fuel to every cell, including cells under roads, streams and houses. To set the fuel in those cells to zero, add a modification rule for each feature when you create the fuel grid. Each rule tests every cell against the feature’s geometry and changes the fuel load bands in the cells that match. For how conditions, actions, buffer_m and target work, see About modifications.

  1. An API key: my-api-key.

  2. A domain: your-domain-id. See Create a domain.

  3. A completed road feature and water feature in that domain. See Create road and water features from OpenStreetMap and record your-road-feature-id and your-water-feature-id.

  4. A completed building feature in that domain. See Create building features and record your-building-feature-id.

  5. A completed FBFM40 grid at 2 m with LANDFIRE’s urban blocks removed. LANDFIRE classifies developed land as NB1 in 30 m blocks, which carry no fuel. remove_non_burnable: ["NB1"] replaces each block with the burnable fuel model around it, so the 2 m features decide where fuel is removed. See Build surface fuel from LANDFIRE, poll the grid to completed, and record your-fbfm40-grid-id:

    POST fbfm40/landfire
    curl -X 'POST' \
    'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/fbfm40/landfire' \
    -H 'accept: application/json' \
    -H 'api-key: my-api-key' \
    -H 'Content-Type: application/json' \
    -d '{
    "name": "FBFM40 — LF2024, 2 m, urban blocks removed",
    "version": "2024",
    "alignment": {"target": "domain", "resolution": 2.0},
    "remove_non_burnable": ["NB1"]
    }'

The examples use the Pattee Canyon domain near Missoula, Montana:

Domain Roads Water Buildings
The Pattee Canyon domain (white outline) with its OSM roads (red), OSM water (blue) and Overture building footprints (purple).
Two maps of 1-hour fuel load over the whole domain, with building footprints outlined. Left: grey stepped bands of 30 m cells with no fuel run along the roads and cover several houses. Right: the same area with those bands filled with fuel like the land around them. Two maps of 1-hour fuel load over the whole domain, with building footprints outlined. Left: grey stepped bands of 30 m cells with no fuel run along the roads and cover several houses. Right: the same area with those bands filled with fuel like the land around them.

fuel_load.1hr on the Pattee Canyon domain, from LANDFIRE FBFM40 at 2 m. Left: LANDFIRE as classified, with its NB1 urban blocks (grey) carrying no fuel. Right: with remove_non_burnable: ["NB1"], the grid the examples below start from. Removing the blocks gives fuel to 34,850 cells.

To remove fuel in every cell a road touches, add one rule: an intersects condition on the road feature with target: "cell", and a replace action that sets each fuel load band to 0. Road features are polygons the width of the road, so the rule needs no buffer_m.

Remove fuel under roads
curl -X 'POST' \
'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/lookup/fbfm40' \
-H 'accept: application/json' \
-H 'api-key: my-api-key' \
-H 'Content-Type: application/json' \
-d '{
"name": "Dead surface fuel — roads masked",
"source_grid_id": "your-fbfm40-grid-id",
"bands": ["fuel_load.1hr", "fuel_load.10hr", "fuel_load.100hr"],
"modifications": [
{
"conditions": [
{"source": "feature", "operator": "intersects", "target": "cell", "feature_id": "your-road-feature-id"}
],
"actions": [
{"band": "fuel_load.1hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.10hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.100hr", "modifier": "replace", "value": 0}
]
}
]
}'

The 201 returns your modifications with defaults filled in, such as "buffer_m": null, and mints a grid id. Record it: your-grid-id. The rule runs while the grid is built.

Grids have no remove action, because every cell keeps its place in the grid. Setting a band to 0 with replace removes its fuel.

Poll the grid, or wait() on it:

GET grid status
curl -X 'GET' \
'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/your-grid-id' \
-H 'accept: application/json' \
-H 'api-key: my-api-key'

On the Pattee Canyon domain the rule removes fuel from 10,939 cells, 38.9 t of dead fuel, or 4.5% of the domain’s 859.1 t.

Two zoomed maps of 1-hour fuel load with road polygons outlined. Before: fuel runs continuously under the roads. Roads masked: every cell the road polygons touch is grey, with no fuel, along the full length of each road. Two zoomed maps of 1-hour fuel load with road polygons outlined. Before: fuel runs continuously under the roads. Roads masked: every cell the road polygons touch is grey, with no fuel, along the full length of each road.

fuel_load.1hr before and after the road rule, in a 220 × 160 m part of the domain. Every cell a road polygon (outlined) touches has no fuel (grey).

To remove fuel in water, reference the water feature in the same rule. Lakes and ponds are polygons, and rivers, canals, streams, drains and ditches are widened into polygons. Other waterway lines stay LineStrings, and with target: "cell" the rule matches every cell a line crosses.

Remove fuel in water
curl -X 'POST' \
'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/lookup/fbfm40' \
-H 'accept: application/json' \
-H 'api-key: my-api-key' \
-H 'Content-Type: application/json' \
-d '{
"name": "Dead surface fuel — water masked",
"source_grid_id": "your-fbfm40-grid-id",
"bands": ["fuel_load.1hr", "fuel_load.10hr", "fuel_load.100hr"],
"modifications": [
{
"conditions": [
{"source": "feature", "operator": "intersects", "target": "cell", "feature_id": "your-water-feature-id"}
],
"actions": [
{"band": "fuel_load.1hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.10hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.100hr", "modifier": "replace", "value": 0}
]
}
]
}'

On the Pattee Canyon domain the rule removes fuel from 2,265 cells along Pattee Creek, 10.1 t of dead fuel.

Two zoomed maps of 1-hour fuel load with the Pattee Creek polygon outlined. Before: fuel runs under the creek. Water masked: a grey strip with no fuel follows the creek. A grey patch at the right edge has no fuel in both maps. Two zoomed maps of 1-hour fuel load with the Pattee Creek polygon outlined. Before: fuel runs under the creek. Water masked: a grey strip with no fuel follows the creek. A grey patch at the right edge has no fuel in both maps.

fuel_load.1hr before and after the water rule. The grey strip follows Pattee Creek (outlined). The grey patch at the right is LANDFIRE bare ground (NB9), which has no fuel before the rule.

To remove fuel under buildings, reference the building feature. Footprints are polygons, so the rule needs no buffer_m.

Remove fuel under buildings
curl -X 'POST' \
'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/lookup/fbfm40' \
-H 'accept: application/json' \
-H 'api-key: my-api-key' \
-H 'Content-Type: application/json' \
-d '{
"name": "Dead surface fuel — buildings masked",
"source_grid_id": "your-fbfm40-grid-id",
"bands": ["fuel_load.1hr", "fuel_load.10hr", "fuel_load.100hr"],
"modifications": [
{
"conditions": [
{"source": "feature", "operator": "intersects", "target": "cell", "feature_id": "your-building-feature-id"}
],
"actions": [
{"band": "fuel_load.1hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.10hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.100hr", "modifier": "replace", "value": 0}
]
}
]
}'

On the Pattee Canyon domain the rule removes fuel from 1,922 cells under the 25 footprints, 8.4 t of dead fuel.

Two zoomed maps of 1-hour fuel load with two building footprints outlined. Before: fuel continues under both houses. Buildings masked: the cells under each footprint are grey, with no fuel. Two zoomed maps of 1-hour fuel load with two building footprints outlined. Before: fuel continues under both houses. Buildings masked: the cells under each footprint are grey, with no fuel.

fuel_load.1hr before and after the building rule, around two houses. The cells under each footprint (outlined) have no fuel.

Remove fuel under roads, water and buildings in one grid

Section titled “Remove fuel under roads, water and buildings in one grid”

To remove fuel under several features in one grid, add one rule per feature. Conditions in a rule are ANDed, so a road condition and a water condition in the same rule match only the cells that touch both. Separate rules match the cells that touch any of them.

Remove fuel under roads, water and buildings
curl -X 'POST' \
'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/lookup/fbfm40' \
-H 'accept: application/json' \
-H 'api-key: my-api-key' \
-H 'Content-Type: application/json' \
-d '{
"name": "Dead surface fuel — roads, water and buildings masked",
"source_grid_id": "your-fbfm40-grid-id",
"bands": ["fuel_load.1hr", "fuel_load.10hr", "fuel_load.100hr"],
"modifications": [
{
"conditions": [
{"source": "feature", "operator": "intersects", "target": "cell", "feature_id": "your-road-feature-id"}
],
"actions": [
{"band": "fuel_load.1hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.10hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.100hr", "modifier": "replace", "value": 0}
]
},
{
"conditions": [
{"source": "feature", "operator": "intersects", "target": "cell", "feature_id": "your-water-feature-id"}
],
"actions": [
{"band": "fuel_load.1hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.10hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.100hr", "modifier": "replace", "value": 0}
]
},
{
"conditions": [
{"source": "feature", "operator": "intersects", "target": "cell", "feature_id": "your-building-feature-id"}
],
"actions": [
{"band": "fuel_load.1hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.10hr", "modifier": "replace", "value": 0},
{"band": "fuel_load.100hr", "modifier": "replace", "value": 0}
]
}
]
}'

On the Pattee Canyon domain the three rules remove fuel from 15,068 cells, 57.1 t of dead fuel, or 6.6% of the domain’s total.

Two maps of 1-hour fuel load over the whole domain. Before: fuel everywhere except one small grey patch. After: grey lines with no fuel trace every road and Pattee Creek, with small grey blocks at each house. Two maps of 1-hour fuel load over the whole domain. Before: fuel everywhere except one small grey patch. After: grey lines with no fuel trace every road and Pattee Creek, with small grey blocks at each house.

fuel_load.1hr over the Pattee Canyon domain before and after the three rules.

To keep part of the fuel, use a multiply action instead of replace. A value of 0.1 keeps 10% of the load in each cell the feature touches.

Thin fuel to 10% under roads
curl -X 'POST' \
'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/lookup/fbfm40' \
-H 'accept: application/json' \
-H 'api-key: my-api-key' \
-H 'Content-Type: application/json' \
-d '{
"name": "Dead surface fuel — thinned to 10% inside roads",
"source_grid_id": "your-fbfm40-grid-id",
"bands": ["fuel_load.1hr", "fuel_load.10hr", "fuel_load.100hr"],
"modifications": [
{
"conditions": [
{"source": "feature", "operator": "intersects", "target": "cell", "feature_id": "your-road-feature-id"}
],
"actions": [
{"band": "fuel_load.1hr", "modifier": "multiply", "value": 0.1},
{"band": "fuel_load.10hr", "modifier": "multiply", "value": 0.1},
{"band": "fuel_load.100hr", "modifier": "multiply", "value": 0.1}
]
}
]
}'

In the SDK, ff.mask() only replaces a band with a value, so the example builds the rule with GridModification and a multiply action.

On the Pattee Canyon domain thinning the same 10,939 road cells removes 35.0 t of dead fuel, against 38.9 t for replace.

Three zoomed maps of 1-hour fuel load along the same roads. Before: fuel under the roads. Replace with 0: the road cells are grey, with no fuel. Multiply by 0.1: the road cells keep a light fill of low fuel. Three zoomed maps of 1-hour fuel load along the same roads. Before: fuel under the roads. Replace with 0: the road cells are grey, with no fuel. Multiply by 0.1: the road cells keep a light fill of low fuel.

fuel_load.1hr along the roads before any rule, with replace and 0, and with multiply and 0.1. Thinned cells keep a tenth of their load.

To also reach the cells beside a feature, add buffer_m (meters) to the condition. The feature’s geometry grows by that distance on every side before the test.

Thin fuel to 10% within 5 m of roads
curl -X 'POST' \
'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/grids/lookup/fbfm40' \
-H 'accept: application/json' \
-H 'api-key: my-api-key' \
-H 'Content-Type: application/json' \
-d '{
"name": "Dead surface fuel — thinned to 10% within 5 m of roads",
"source_grid_id": "your-fbfm40-grid-id",
"bands": ["fuel_load.1hr", "fuel_load.10hr", "fuel_load.100hr"],
"modifications": [
{
"conditions": [
{"source": "feature", "operator": "intersects", "target": "cell", "feature_id": "your-road-feature-id", "buffer_m": 5}
],
"actions": [
{"band": "fuel_load.1hr", "modifier": "multiply", "value": 0.1},
{"band": "fuel_load.10hr", "modifier": "multiply", "value": 0.1},
{"band": "fuel_load.100hr", "modifier": "multiply", "value": 0.1}
]
}
]
}'

On the Pattee Canyon domain a 5 m buffer raises the thinned cells from 10,939 to 23,969, and the dead fuel removed from 35.0 t to 76.6 t.

Two zoomed maps of 1-hour fuel load along the same roads, both thinned to 10%. No buffer: the thinned strip matches the road polygons. Buffer 5 m: the thinned strip is wider, reaching 5 m past each edge of the road. Two zoomed maps of 1-hour fuel load along the same roads, both thinned to 10%. No buffer: the thinned strip matches the road polygons. Buffer 5 m: the thinned strip is wider, reaching 5 m past each edge of the road.

fuel_load.1hr thinned to 10% under the roads (outlined), without a buffer and with buffer_m: 5.

To mask every feature, including ones narrower than a cell, set target: "cell", as the examples above do. The default, target: "centroid", matches a cell only if its center falls inside the geometry, so a narrow path or a small building that contains no cell center masks nothing. With cell, every cell a feature touches is masked whole, so the masked area is larger than the feature.

On the Pattee Canyon domain the building rule masks 1,922 cells with cell and 1,396 with centroid. None of the 25 footprints is smaller than one 2 m cell, and all 25 are smaller than one 30 m cell, so on a 30 m grid centroid can miss whole houses.

Two zoomed maps of 1-hour fuel load around two houses with footprints outlined. Centroid: the grey cells with no fuel stay inside each outline. Cell: the grey cells extend just past each outline. Two zoomed maps of 1-hour fuel load around two houses with footprints outlined. Centroid: the grey cells with no fuel stay inside each outline. Cell: the grey cells extend just past each outline.

The building rule with target: "centroid" and with target: "cell". With cell, the cells along each footprint’s edge are masked too.

  • 422 for a bad feature_id. The create call checks every referenced feature before it creates the grid. The feature must exist, belong to this domain and be completed. A failed check creates no grid:

    {
    "detail": "Modification references feature_id 'does-not-exist', which does not exist in this domain."
    }
  • 422 for a feature that isn’t completed. The message names the feature’s current status. Poll the feature to completed first.

  • 422 for a feature from another domain. The message is the same as for an unknown feature. The feature and the grid must share a domain.

  • Fuel left in other bands. Each action names one band. If your grid carries live or herbaceous loads, add an action for each of those bands, or they keep their values inside the feature.

  • Masked roads with no change. If LANDFIRE’s NB1 blocks are kept, many road and building cells already have no fuel, and the rules change little. Set remove_non_burnable: ["NB1"] on the FBFM40 grid first.