I needed to sample the closest point on the surface of the geometry in my scenes at any given time or position. The process was super expensive, but I implemented a system that bakes all the geometry in the scene in a grid for easy access. We can now sample at nearly no cost!
One of the things I learned by working with Unity is that big-scale projects end up needing to implement multi scenes to speed up the production. The query manager then can work in single scene mode with regular references or switch to using GUID references that allow the system to reference geometry in other scenes. This is useful when for example all the logic is in one scene, but the art of the level is broken into different smaller scenes for performance reasons.
If the scene is big enough or it is not aligned with the world you might end up with a huge amount of quadrants to cover all the area of the level, and usually, most of them are empty!
This is why the system only takes into account chunks of space that are not empty, that is why the final grid has holes in it.