You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
aggregate_vector_per_cell: support grouping per feature (by=['cellid', boundname]) #589
nlmod.grid.aggregate_vector_per_cell groups by cellid only, so pieces of different features that share a cell are always merged. For boundary conditions that need per-feature budgets/boundnames (e.g. one RIV reach per lake per cell), the aggregation should first merge pieces of the same feature within a cell and keep features separate.
Current workaround in NHFLO/tools: nhflotools.lakes._aggregate_lake_cells loops groupby('identificatie') and calls aggregate_vector_per_cell once per feature — functional but O(n_features) calls and not reusable.
Proposal: a by= parameter, default 'cellid' (backward compatible), accepting ['cellid', '<boundname column>'] so the per-feature step becomes a one-liner. Related: #582 moves the lake piece→cell aggregation into lake_from_gdf; this issue is the generic primitive underneath it.
Activity