Calculates geometric descriptors for fire-affected polygons from a list of input shapefiles.
Metrics include area, perimeter, bounding box dimensions, rotated bounding box, and shape ratios.
Optionally applies spatial filters and performs attribute joins to enrich outputs.
For each input shapefile, the function:
- Computes metrics per polygon and saves a new shapefile.
- Applies spatial filters and saves a filtered version.
- Optionally joins metrics back to the original input polygons (if `join_attributes = TRUE`).
If `dissolve = TRUE`, adjacent polygons are merged to reconstruct contiguous burned areas.
A numeric `burned_id` is then assigned to each resulting polygon and used in subsequent joins.
## Metrics computed per polygon:
- `area_ha`: Area in hectares.
- `bbox_wx`: Width of axis-aligned bounding box (x).
- `bbox_hy`: Height of axis-aligned bounding box (y).
- `perim_m`: Perimeter in meters.
- `p_w_ratio`: Perimeter-to-width ratio.
- `h_w_ratio`: Height-to-width ratio.
- `burned_id`: Polygon ID if `dissolve = TRUE`.
## Filter behavior:
All thresholds are optional. If a threshold is `NULL`, the corresponding filter is skipped.
If `filter_logic = "AND"`, all active filters must be satisfied. If `"OR"`, any filter match is sufficient.
## Spatial join (`join_attributes = TRUE`):
- Attributes from the original input shapefile are preserved via intersection-based joins.
- Only input polygons with area ? `min_input_area_ha` are used.
- The join selects, for each input polygon, the intersecting output polygon with the largest shared area.
- Only polygons that intersect filtered outputs are retained in the joined outputs.
- Optionally, you can restrict which variables from the original shapefile to retain using `columns_to_keep`.