Generalization is an abstraction process by which characteristics of spatial patterns should be preserved and highlighted. This requires the patterns to be detected beforehand. Additionally, automated enrichment of spatial data is of growing importance for many mapping agencies in order to respond to varying user needs. In this paper we present a framework for pattern recognition in urban environments that complements current algorithm-centered approaches by first formalizing spatial patterns in ontologies, and then deductively triggering appropriate low-level pattern recognition techniques. We start our paper by giving an introduction to the terminology of ontologies. Existing work on pattern recognition using semantic models is reviewed. We then outline our general framework and exemplify an ontological model of an urban structure for a case study we are currently working on. Finally, we discuss issues, benefits and challenges of the approach.