input(name: 'asset', relation: 'nyc_buildings') as assets
-> filter(filter: true) as assets_filtered

input(name: 'hazard', relation: 'kaiju_route') as hazards
-> filter(filter: true) as hazards_filtered

join(on: intersects(hazard.geom, asset.geom), join_type: 'left_outer') as asset_and_hazard
assets_filtered -> asset_and_hazard.lhs
hazards_filtered -> asset_and_hazard.rhs

asset_and_hazard -> select({*, loss: kaiju_stomp(asset, hazard)}) as loss
