A structure recognition technique is presented that can be employed for contextual building and built-up area generalisation in medium-scale topographic maps. Owing to various spatial configurations, a contextual mechanism is necessary to achieve acceptable results in cartographic generalisation. Spatial structures are usually implicit in data, and advanced analysis and processing methods are required to detect them. This technique is based on auxiliary geometric data structures and spatial analysis methods. A case study is performed with a topographic data set, using an interface developed in an object-oriented geographic information system (O-O GIS). The proposed approach was found to assist and improve automation.