ENH: Use SpatialObject::GetMaximumDepth instead of 99999.

Change-Id: I6fdd2c2a4c0d338eb0965b7ca054ac27db853524
Merge topic 'GetMaximumDepth'

bbc9275 ENH: Use SpatialObject::GetMaximumDepth instead of 99999.