Add tree depth query to QuadIndex.