Metric maps, like occupancy grids, are the most common way to represent indoor environments in mobile robotics. Although accurate for navigation and localization, metric maps contain little knowledge about the structure of the buildings they represent. However, if explicitly identified and represented, this knowledge can be exploited in several tasks, such as semantic mapping, place categorization, path planning, human robot communication, and task allocation. The layout of a building is an abstract geometrical representation that models walls as line segments and rooms as polygons. In this paper, we propose a method to reconstruct two-dimensional layouts of buildings starting from the corresponding metric maps. In this way, our method is a...