Complete a tree inventory with GDAM allometry
You are viewing in-progress documentation for v2. Switch to the stable version for the current production release.
To fill in the dbh, crown_ratio, fia_species_code and crown_base_height
of a tree inventory that has only positions and heights, POST to
inventories/tree/allometry/gdam. The result is a new inventory. For what GDAM
is and when to use it, see
GDAM: filling in what a source left out.
Prerequisites
Section titled “Prerequisites”-
An API key: my-api-key.
-
A domain: your-domain-id. See Create a domain.
-
A completed tree inventory with a value for every tree in
x,yandheight, such as a CHM inventory or an uploaded tree list. Record its id: inventory-to-complete.
Create the GDAM inventory
Section titled “Create the GDAM inventory”POST to inventories/tree/allometry/gdam with source_tree_inventory_id set
to the source inventory. source_tree_inventory_id is the only required field.
By default GDAM imputes dbh, crown_ratio, fia_species_code and
crown_base_height.
curl -X 'POST' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/inventories/tree/allometry/gdam' \ -H 'accept: application/json' \ -H 'api-key: my-api-key' \ -H 'Content-Type: application/json' \ -d '{ "name": "Tree inventory from GDAM allometry", "source_tree_inventory_id": "inventory-to-complete"}'import fastfuels_sdk.v2 as ff
ff.set_api_key("my-api-key")
inventory = ff.inventories.create_tree_inventory_with_gdam_allometry( "your-domain-id", "inventory-to-complete", name="Tree inventory from GDAM allometry",){ "id": "your-inventory-id", "domain_id": "your-domain-id", "type": "tree", "name": "Tree inventory from GDAM allometry", "description": "", "status": "pending", "progress": null, "created_on": "2026-11-03T21:33:17.353960Z", "modified_on": "2026-11-03T21:33:17.353960Z", "checksum": "ec926044b39b4e66b20bcf6d6d13767b", "source": { "name": "gdam", "source_tree_inventory_id": "inventory-to-complete", "source_tree_inventory_checksum": "3eab89c085954a8fb2306247576315ea", "impute_columns": [ "dbh", "crown_ratio", "fia_species_code", "crown_base_height" ], "overwrite": false, "crown_base_height_model": { "name": "gdam" }, "conditioned_columns": [] }, "modifications": [], "treatments": [], "columns": [ { "key": "tree_id", "type": "categorical", "unit": null, "summary": { "type": "categorical", "count": 8040, "null_count": 0, "unique_count": 8040 } }, { "key": "x", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 8040, "null_count": 0, "min": 720226.2998630336, "max": 721533.7026895626, "mean": 720773.5308036121, "std": 366.6012326050068 } }, { "key": "y", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 8040, "null_count": 0, "min": 5189762.299863034, "max": 5190646.296086108, "mean": 5190228.973942304, "std": 250.60501047478576 } }, { "key": "height", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 8040, "null_count": 0, "min": 2.009999990463257, "max": 32.689998626708984, "mean": 14.77024502920274, "std": 6.678434829870902 } }, { "key": "dbh", "type": "continuous", "unit": "cm", "summary": null }, { "key": "crown_ratio", "type": "continuous", "unit": null, "summary": null }, { "key": "fia_species_code", "type": "categorical", "unit": null, "summary": null }, { "key": "crown_base_height", "type": "continuous", "unit": "m", "summary": null } ], "forestry_metrics": null, "georeference": null, "error": null, "tags": []}The 201 returns the new inventory’s id. Record it: your-inventory-id.
Poll until completed:
curl -X 'GET' \ 'https://api.fastfuels.silvxlabs.com/v2/domains/your-domain-id/inventories/your-inventory-id' \ -H 'accept: application/json' \ -H 'api-key: my-api-key'inventory.wait(){ "id": "your-inventory-id", "domain_id": "your-domain-id", "type": "tree", "name": "Tree inventory from GDAM allometry", "description": "", "status": "completed", "progress": { "percent": 100, "message": "Complete" }, "created_on": "2026-11-03T21:33:17.353960Z", "modified_on": "2026-11-03T21:33:23.072894Z", "checksum": "ec926044b39b4e66b20bcf6d6d13767b", "source": { "overwrite": false, "conditioned_columns": [], "name": "gdam", "source_tree_inventory_checksum": "3eab89c085954a8fb2306247576315ea", "crown_base_height_model": { "name": "gdam" }, "impute_columns": [ "dbh", "crown_ratio", "fia_species_code", "crown_base_height" ], "source_tree_inventory_id": "inventory-to-complete" }, "modifications": [], "treatments": [], "columns": [ { "key": "tree_id", "type": "categorical", "unit": null, "summary": { "type": "categorical", "count": 8040, "null_count": 0, "unique_count": 8040 } }, { "key": "x", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 8040, "null_count": 0, "min": 720226.2998630336, "max": 721533.7026895626, "mean": 720773.5308036121, "std": 366.601232605016 } }, { "key": "y", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 8040, "null_count": 0, "min": 5189762.299863034, "max": 5190646.296086108, "mean": 5190228.973942304, "std": 250.60501047491707 } }, { "key": "height", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 8040, "null_count": 0, "min": 2.009999990463257, "max": 32.689998626708984, "mean": 14.77024502920274, "std": 6.678434829870902 } }, { "key": "dbh", "type": "continuous", "unit": "cm", "summary": { "type": "continuous", "count": 8040, "null_count": 0, "min": 2.3453442318573723, "max": 141.4560156026357, "mean": 27.030586728262126, "std": 13.723884952274735 } }, { "key": "crown_ratio", "type": "continuous", "unit": null, "summary": { "type": "continuous", "count": 8040, "null_count": 0, "min": 0.015142143969596913, "max": 0.992249585782702, "mean": 0.5736548083943268, "std": 0.19524779155260893 } }, { "key": "fia_species_code", "type": "categorical", "unit": null, "summary": { "type": "categorical", "count": 8040, "null_count": 0, "unique_count": 7 } }, { "key": "crown_base_height", "type": "continuous", "unit": "m", "summary": { "type": "continuous", "count": 8040, "null_count": 0, "min": 0.008242431326359358, "max": 23.716954232753572, "mean": 4.79216666561623, "std": 4.219128946583233 } } ], "forestry_metrics": { "type": "tree", "tree_count": 8040, "basal_area_per_area": 21.861444437982684, "tree_density": 28.139447970191252, "quadratic_mean_diameter": 11.93487694100315, "dominant_species_groups": [ { "spgrpcd": 4, "name": "Pine", "basal_area_share": 0.7465915406116056 }, { "spgrpcd": 2, "name": "Douglas-fir", "basal_area_share": 0.24594180860507625 }, { "spgrpcd": 1, "name": "Cedar/larch", "basal_area_share": 0.0055483685001182365 }, { "spgrpcd": 10, "name": "Juniper/oak/mesquite", "basal_area_share": 0.0015385229149479957 }, { "spgrpcd": 5, "name": "Spruce", "basal_area_share": 0.0002641526344587695 } ] }, "georeference": { "crs": "EPSG:32611", "bounds": [720226.0, 5189762.0, 721534.0, 5190646.0] }, "error": null, "tags": []}The response above completes a Blue Mountain CHM inventory made as in
Generate a tree inventory from a CHM:
8,040 trees in, 8,040 trees out. Each tree keeps its tree_id, x, y and
height, and gains dbh (cm), crown_ratio, fia_species_code and
crown_base_height (m).
Each imputed value is one random draw from GDAM, seeded from the new
inventory’s id. Two inventories made from the same source have the same trees
but different values, so check your result by its tree_count and its columns,
not by the summaries above.
Next steps
Section titled “Next steps”- Voxelize it. Voxelization needs
x,y,height,dbh,crown_base_heightandfia_species_codefor every tree, and the completed inventory has all six. Voxelize the inventory into a canopy bulk-density grid. - Thin it. Silvicultural treatments
need a
dbhcolumn. You can also remove trees near roads or water. - Read the trees. Fetch and stream the inventory data to inspect the imputed columns.
Common pitfalls
Section titled “Common pitfalls”404for the source inventory. The source must becompletedand in the same domain. Poll it tocompletedbefore creating the GDAM inventory.422, missingx,yorheight. Every tree in the source needs a value in all three. Fix the source file and upload it again.- No
fia_status_code. GDAM does not impute tree status. Voxelization treats a tree with nofia_status_codeas live. For an explicit live or dead status, the source must carryfia_status_code, as an upload that includes it or a TreeMap inventory does. - Measured values available. If you have measured DBH, crown or species data, upload it with the trees. GDAM keeps those values and imputes only the empty cells.
- Completing a TreeMap inventory. A TreeMap inventory already carries every column voxelization needs. Voxelize it directly.