Landslide Science
Rule · centroid_albers_x
centroid_albers_x
→ writes centroid_albers_x
This is read live from inventory/derived.py via
inspect.getsource(); what you see is exactly what runs.
def compute_centroid_albers_x():
"""Centroid easting in EPSG:3338 (NAD83 / Alaska Albers, meters).
Rounded to whole meters. The primary polygon is selected via the shared
LATERAL: slow → body; catastrophic → source first, fallback deposit. The
centroid is computed in Albers so it's a true geometric center (Mercator
centroids drift at Alaskan latitudes).
"""
return """
SELECT l.id, ROUND(ST_X(c.albers)::numeric)::bigint AS computed
""" + _CENTROID_LATERAL + " ORDER BY l.id"
All rows already match this rule — nothing to apply.