Group buildings into blocks.