Spatial subdivision of complex indoor environments for 3D indoor navigation