Landslide Science Rule · volume_body
← All rules

volume_body → writes volume_body

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_body():
    """Sum of body-polygon volume estimates for this landslide."""
    return """
        SELECT l.id,
               SUM(p.polygon_volume) FILTER (WHERE p.role = 'body')::bigint AS computed
        FROM landslides l
        LEFT JOIN landslide_polygons p ON p.landslide_id = l.id
        GROUP BY l.id
        ORDER BY l.id
    """

Proposed changes

All rows already match this rule — nothing to apply.