Skip to content

Run on your own inventory

cascade.run takes a CascadeInputs (what is where) and a CascadeParams (the scenario and every choice). This page is the checklist for CascadeInputs. The column-by-column contract is in Cascade inputs.

1. One metric CRS for everything

Choose a projected CRS in metres, such as the local UTM zone or a national transverse Mercator grid, and reproject every layer to it:

from quakecascade import crs as qcrs

run_crs = qcrs.estimate_utm_crs(lon, lat)       # or your national grid, e.g. "EPSG:5253"
buildings = buildings.to_crs(run_crs)           # the same for roads, units, facilities ...

cascade.run refuses a geographic CRS and any Mercator projection. It also refuses a frame whose own CRS differs from inputs.crs, so a layer that was not reprojected fails at the start instead of producing distances off by hundreds of kilometres.

2. Buildings

One row per building, with the columns of cascade.BUILDING_COLUMNS:

Column Meaning If unknown
building_id stable id (required)
geometry footprint polygon (required)
floors storeys above ground NaN. Then state CascadeParams.default_height (the Hazus height class to assume)
height_m height in metres, used for debris reach NaN. Then state unknown_height_reach_m
building_type Hazus base type (C1, URM, W1, ...) or height-resolved label (C1M) None. The building reads no_building_type
occupancy occupancy class or text (Residential, RES1, school, ...) None. Casualties read no_occupancy
occupants people inside at night NaN. Casualties read no_occupants
dwelling_units dwellings (0 for non-residential) NaN. Shelter reads no_units
vs30_m_s site Vs30 (measured, from a site map, or from slope) NaN. The building reads no_vs30 all the way down
unit_id the planning unit it belongs to NaN, or an id not in units. Counted as outside every unit

Every missing value travels as a status, never as a zero. A unit whose buildings are not all computed is a lower bound and, with the default partial_units="exclude", stays out of the ranking and the shelter balance. See Design principles.

Building types

The Hazus types are US model building types. Mapping a local typology to them, for example reinforced-concrete frames by code era to C1 at a pre, low or moderate design level, is a judgement for the study. Write it down. CascadeParams.design_levels brackets the code era when it is uncertain.

3. Roads

Noded centrelines (lines meet at shared vertices at junctions) with edge_id, road_class and width_m. Widths must be known for every road: the run stops before any stage if one is missing. Fill gaps from a class table with debris.highway_width_m(classes, table, fallback=...), or drop those roads. A class missing from CascadeParams.road_speeds_kmh is not routed. Use this to exclude footpaths.

4. Facilities, sites and planning units

Input Columns Used by
hospitals geometry, beds (NaN if unknown) isolation status, 2SFCA access
fire_stations geometry a second isolation target
sites site_id, geometry, area_m2 p-median depots and the capacity balance
units unit_id, geometry, population demand points, isolation, ranking

Polygons are reduced to a representative point. Any point farther than CascadeParams.max_snap_m from the road network is reported as off the network (no_node, no_travel_time), never silently moved.

5. Optional: terrain and pipes

  • dem, dem_transform: an elevation grid in the run CRS (row 0 at the top) and (x_min, y_max, cell_size_m). They switch on the liquefaction screen. datasets.regrid_dem averages any DEM onto such a grid, 1 km being the input scale of the Zhu et al. (2015) model.
  • pipes: a table with unit_id, length_km and material. It switches on pipeline repairs. Name your ductile and brittle material codes in pipe_ductile and pipe_brittle.

6. Check before you trust

res = cascade.run(inputs, params)
for name, info in res.stages.items():
    print(name, info)                     # counts per status, skipped stages and why
print(res.summary())                      # every sum with the buildings it leaves out

Read the stage log first. It says how many buildings had no Vs30, how many heights were assumed, how many units or sites lay off the network and how many roads are uncertain. Those counts belong in the report next to the results.