Landslide Science
Rule · volume_preferred
volume_preferred
→ writes volume_preferred
This is read live from inventory/derived.py via
inspect.getsource(); what you see is exactly what runs.
def compute_volume_preferred(row):
"""The single best volume to report for this landslide.
If `volume_site_specific` is set (a manually-entered, independently
calculated value from a field study or paper), use it. Otherwise fall
back to the rule-driven `volume_estimated`.
This is what api_features serves to the map and what downstream consumers
should treat as the canonical volume.
"""
vss = row.get('volume_site_specific')
if vss is not None:
return vss
return row.get('volume_estimated')
All rows already match this rule — nothing to apply.