updateIndex abstract method
Updates the spatial index based on the operation.
getItem allows retrieving the current state of an item by key (useful for Move ops).
Implementation
void updateIndex(SpatialIndex<T> index, Op<T> op, T? Function(Key) getItem);