In agent-based pedestrian model, steering movement is driven by position of attractor or goal, and a graph of their relations. Our work studied on constructing relationship between spatial cognition and enclosed space using virtual agent. Instead of focusing on location-based goals, we are investigating enclosed space as primary factor for locomotion. Our contribution on the identification of enclosure enhances the artificial model of spatial cognition. This is significant for the development of agent-based simulation with spatial cognition to determine and to measure space in architectural design model. We present our approach using three stages of methods. First, we constructed object detection algorithm on agent line of sight. Second, by decomposing detected objects as set of points, we analyzed their attributes and properties to define center of enclosed space. Third, as point of enclosed spaces determined, we classified them into L-shaped space and U-shaped space using simple arithmetic algorithm. Finally, computational results of points represent goals for navigational purpose.