Greedy declutter: in ascending rank order, keep a label if its (padded) box doesn't overlap any
already-kept box; otherwise drop it. Returns the kept ids in placement order. O(n²) ā fine for the
few-hundred candidates a viewport holds after frustum culling; swap for a grid if it ever isn't.
Ties on rank break by id for deterministic output.
Greedy declutter: in ascending
rankorder, keep a label if its (padded) box doesn't overlap any already-kept box; otherwise drop it. Returns the kept ids in placement order. O(n²) ā fine for the few-hundred candidates a viewport holds after frustum culling; swap for a grid if it ever isn't. Ties onrankbreak byidfor deterministic output.