Landslide Science
Rule · size_inclusion
size_inclusion
→ writes size_inclusion
This is read live from inventory/derived.py via
inspect.getsource(); what you see is exactly what runs.
def compute_size_inclusion(row):
"""True if this landslide meets the inventory's size threshold.
Thresholds (in m², applied to the role-summed polygon areas):
- Slow: area_body ≥ 50,000 m²
- Catastrophic: area_source ≥ 50,000 m² OR
area_deposit ≥ 500,000 m²
- Other types: None (under-review / unclassified)
Depends on `area_body` / `area_source` / `area_deposit` being populated
(apply the area rules first; they in turn depend on polygon_area).
"""
t = (row.get('landslide_type') or '').strip().lower()
if t == 'slow':
ab = row.get('area_body') or 0
return ab >= SLOW_BODY_AREA_THRESHOLD_M2
if t == 'catastrophic':
a_src = row.get('area_source') or 0
a_dep = row.get('area_deposit') or 0
return (a_src >= CAT_SOURCE_AREA_THRESHOLD_M2
or a_dep >= CAT_DEPOSIT_AREA_THRESHOLD_M2)
return None
All rows already match this rule — nothing to apply.