This paper presents a framework for transforming complex 3D city data (CityGML) into queryable Knowledge Graphs (KGs). By using ontologies and declarative mappings, the authors bridge the gap between rigid relational databases and intuitive, cross-dataset spatial analysis, enabling users to combine 3D building models with crowdsourced data like OpenStreetMap.
What Problem Does This Paper Address?
3D city models are essential for urban planning, disaster management, and energy estimation. The industry standard, CityGML, is excellent for exchanging data but notoriously difficult to query. Most practitioners store this data in relational databases like 3DCityDB.
However, two major hurdles remain:
- The Semantic Gap: The underlying database schemas are highly complex. A simple question like "Find all residential buildings with gabled roofs" requires navigating a labyrinth of SQL joins that are unintuitive for most end-users.
- Data Silos: CityGML data is often "lonely." It contains precise 3D geometries but lacks rich semantic information found in other sources, such as the business names or points of interest (POIs) found in OpenStreetMap (OSM).
Methods
The authors propose a Virtual Knowledge Graph (VKG) approach using the Ontop system. Instead of physically converting all data into a new format (materialization), they create a "virtual" layer that maps the existing relational database to a high-level ontology.
Key components include:
- Ontology Alignment: Adopting and refining a CityGML 2.0 ontology to represent urban concepts (Buildings, Surfaces, etc.).
- R2RML Mappings: Using declarative mappings to translate SPARQL queries (the standard for KGs) into optimized SQL queries on the fly.
- Spatial Data Linking: A novel three-step geometry-based matching process to link CityGML building surfaces with OSM polygons, handling 1:1, 1:n, and m:n relationships.
- GeoSPARQL: Leveraging spatial extensions to SPARQL to perform complex geometric operations like buffers and intersections.
Datasets
The framework was evaluated using real-world data from Munich, Germany:
- CityGML: Level of Detail 2 (LoD2) building data from the Bavarian Open Data portal.
- OpenStreetMap (OSM): 3,839 building footprints and 2,718 POIs for the same central Munich area.
- 3DCityDB: Used as the primary relational storage engine (PostgreSQL/PostGIS).
Key Insights and Ideas
- Abstraction over Complexity: The KG approach allows users to query concepts they understand (e.g.,
bldg:RoofSurface) rather than specific table IDs. This is particularly useful given the different Levels of Detail (LoD) in CityGML, as shown in Figure 1.
- The "Virtual" Advantage: By using VKGs, the authors avoid the massive storage overhead and data staleness issues associated with materializing billions of RDF triples. The data stays in the optimized relational database, but the user sees a graph.
- Reification of Links: To combine CityGML and OSM, the authors created a specific
Association_CityGML_OSMclass. This allows the KG to store metadata about the match itself (e.g., whether it's a direct match or an adjacency), which is crucial for handling the inherent heterogeneity of geospatial data.
Key Results
The authors tested 10 complex queries (Q1–Q10) across three systems: Ontop (VKG), Apache Jena, and GraphDB (Materialized).
- Expressiveness: The KG successfully answered multi-source questions like "Find hotels over 30 meters high," where height came from CityGML and the "hotel" designation came from OSM.
- Performance: Most queries executed in under 1 second. Even the most complex spatial join (Q10), which involved calculating affected areas within 20m of a specific road, was handled by Ontop in roughly 9.8 seconds.
- Spatial Maturity: Ontop outperformed the materialized RDF stores on complex spatial functions because it could delegate those tasks to the highly mature PostGIS engine.
Limitations and Future Work
- Complex Geometry Support: While Ontop handled complex geometries well, materialized stores like Apache Jena and GraphDB struggled or failed with polyhedral surfaces and geometry collections.
- Ontology Maintenance: The current CityGML 2.0 ontology contains some inconsistencies (duplicate property definitions) that required manual intervention.
- Evolving Standards: The framework needs to be updated for CityGML 3.0, which introduces time-dependent features and changes how Levels of Detail are handled.
- Global Robustness: Different countries have different encoding standards for CityGML. The authors note that mappings designed for Germany might not work perfectly for data from Estonia without further refinement.
Summary updated