Landslide Science
Rule · polygon_area
polygon_area
→ writes area
This is read live from inventory/derived.py via
inspect.getsource(); what you see is exactly what runs.
def compute_polygon_area():
"""Per-polygon area in EPSG:3338 (NAD83 / Alaska Albers, equal-area).
Computed via PostGIS `ST_Area(ST_Transform(geom, 3338))` for accuracy
at high latitudes — Mercator-based areas can be off by 4-6× at Alaskan
latitudes. Rounded to whole square meters so re-applies are idempotent.
Writes to landslide_polygons.area; consumed by area_body / area_source /
area_deposit (which sum these by role).
"""
return """
SELECT id,
ROUND(ST_Area(ST_Transform(geom, 3338))::numeric, 0)::float8 AS computed
FROM landslide_polygons
ORDER BY id
"""
All rows already match this rule — nothing to apply.