The comprehensive definition of buildings in urban spatial databases (SDBs) and geographic information systems (GISs) is crucial for city management, considering their essential role in cities. Modern urban geospatial applications such as smart cities need a rich-information infrastructure, relying upon urban SDBs and GISs, powered by multiple data sources. In this respect, many geospatial techniques are available for acquiring geometric data of buildings, but their semantic definitions require extra effort. Today, volunteered geographic information (VGI) platforms are assumed to be alternative geospatial data sources and their integration with official datasets provides a new opportunity for the enrichment of urban geospatial datasets. In this context, geospatial semantic web technologies can contribute to the semantic enrichment process. This study presents a methodology for enriching various building datasets using GIS and geospatial semantic web technologies, enabling an enhanced definition of building functions. The proposed method makes use of an OpenStreetMap (OSM) dataset to obtain missing semantic information about building features. The enrichment process was implemented by transferring OSM point of interest (POI) values to associated OSM building features through the application of semantic web rule language (SWRL) rules. Furthermore, the same process was also applied to two additional official datasets at different levels of detail (TOPO1K and TOPO25K), which were subsequently incorporated into the geospatial ontology. The resulting geospatial ontology offers new opportunities for functional definition and logical rule-making for buildings, with the potential to uncover new classes and insights. In addition, it allows for the definition of terms and explanations in multiple languages, covering most of the OSM values used worldwide for selected tags to define building functions.