Landslide Science Rule · volume_estimated
← All rules

volume_estimated → writes volume_estimated

1556 already match 0 would change

Function source

This is read live from inventory/derived.py via inspect.getsource(); what you see is exactly what runs.

def compute_volume_estimated(row):
    """Landslide-level estimated volume (m³).

    For slow landslides:        volume_body
    For catastrophic landslides: max(volume_source, volume_deposit)
                                  — source vs deposit can disagree because of
                                    deposit run-out / entrainment / removed
                                    material; the larger is the more defensible
                                    estimate for "size of the failure."
    For other / unclassified types: NULL.

    Depends on `volume_body` / `volume_source` / `volume_deposit` being
    populated; those in turn depend on `polygon_volume`.
    """
    t = (row.get('landslide_type') or '').strip().lower()
    if t == 'slow':
        return row.get('volume_body')
    if t == 'catastrophic':
        v_src = row.get('volume_source')  or 0
        v_dep = row.get('volume_deposit') or 0
        v = max(v_src, v_dep)
        return v if v > 0 else None
    return None

Proposed changes

All rows already match this rule — nothing to apply.