Research Article

An Optimization Technique of the 3D Indoor Map Data Based on an Improved Octree Structure

Algorithm 1

Octree Map Data Storage.
Input: TreeNode//Map scene is as root node
Output: TreeNode//The root node of the segmented data storage model
Begin:
 For i = 0: MAX//Scene segmentation
  newNodeDepth = nodeDepth + 1
  newNodeParents = node
  newNodeAABB = nodeAABB/8
  If nodeAABB.value > 2 and node.AABB > nodeMin then
   If Line on nodeAABB then
    Search for the smallest ancestor
    Data is stored in the ancestor node
    Delete original data
   End If
   Divide node
   Node coding
  End If
 End For
 Store leaf node data
 Return TreeNode
End