Automatically representing the semantics and topology of indoor building spaces from floor-plans is necessary for many applications, such as architectural design and indoor renovations. Extensive studies have investigated reconstructing indoor spaces with semantics and topology using professional means (e.g., laser scanning and photogrammetry). Floor-plan raster maps are widely and freely available for various purposes. Nevertheless, there is little research on the semantic and topological representation of indoor elements from floor-plan raster maps. To fill this gap, we propose a method of automatically representing the semantics and topology of indoor spaces from floor-plan raster maps. The proposed method first identifies basic geometric primitives from floor-plans using a learning-based hierarchical segmentation approach. Second, the relationship between the detected geometric primitives is assembled into the planar structure representation with topological data using mixed integer programming. Finally, the floor-plan graph structure is checked and optimized to maintain consistency with a polygonal coordinate descent strategy, resulting in a correct representation of the semantics and topology of the indoor space. Comprehensive evaluations demonstrate that the proposed method effectively achieves superior performance in three different datasets. The proposed method allows for 3D model popups for better visualizations and direct architectural model manipulations of the interior building layouts computation.