Skip to content

Populate fia_crown_class_code (FIA CCLCD) in standgen/PIM inventories #523

Description

@amarcozzi

fia_crown_class_code (FIA CCLCD, crown class 1-5) is now a first-class optional inventory column: the upload column mapping accepts it, the uploader validates it (isin 1-5), read_inventory projects it when present, and the griddle canopy handler translates it onto core's D/C/I/S crown-class factors (falling back to Other/none when absent). Landed on 452-canopy-inventory-endpoint.

standgen's point-process (PIM) output does not carry it — columns.py RENAME_MAP stops at SPCD/STATUSCD/DIA/HT/CR/X/Y — so generated inventories fall back to Other/none. To populate it:

  1. Prerequisite: fastfuels-core's point process must carry CCLCD from the FIA source through to its tree output (a fastfuels-core change).
  2. standgen columns.py: add RENAME_MAP["CCLCD"] = "fia_crown_class_code" and include it in BASE_COLUMNS.
  3. services/api/api/resources/inventories/schema.py: add it to BASE_INVENTORY_COLUMNS (PIM's declared produced set) once PIM actually emits it — deliberately omitted now so PIM docs don't declare a column the parquet lacks.

Until then the column is correctly absent from PIM output. GDAM allometry cannot impute it — crown class is a field observation, not derivable from dbh/height.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions