Introduction
Building Information Models are comprehensive digital representations of buildings which include 3D geometry and associated data. They are widely used for designing, engineering, and constructing buildings (vertical BIM) and infrastructure (horizontal BIM). Owners are beginning to see value in BIM models and data for operating buildings. A BIM model includes not just the 3D geometry of all building elements and the enclosed spaces, but also semantic information representing both the type of the elements, the relationships between them (defined by the data model) and data associated with the geometric elements. With BIM models being mandated in countries like the UK, Finland and Singapore, and in France and Russia in the near future, and the increasing adoption of BIM by the private sector in the U.S. and other countries, the volume of BIM data is growing rapidly. By merging models from different disciplines into common virtual models, the amount of information stored in such multidomain repositories quickly becomes large and complex even for average projects. Centralized or distributed repositories enable the creation, integration and maintenance of large quantities of data from various stakeholders involved in the planning and building process and the wide range of specialized software tools used by these stakeholders. Many ways of creating, manipulating and visualizing BIM and CAD models have been developed including CAD, Solibri, Navisworks, GTPPM, mvdXML, PQML, EQL, SQL, XSLT/XQuery, SPARQL, Gremlin, Linq, SDAI, and generic programming languages. However, the development of a general, intuitive query language for BIM models including geometric and related information remains a challenge.
The information needs of individual stakeholders in different parts of the construction process are very different. For example, a structural engineer does not require all the information available in the overall building model such as the detailed specifications of a suspended ceiling. This makes the extraction of partial model subsets or domain specific views on large models necessary. In addition regulations, energy performance modeling, and building maintenance require finding specific facilities among the building assets.
In the last few years research has focussed on the development of an open, domain-specific query language for BIM. Most of the this research has focussed on querying, updating and deleting data stored in Industry Foundation Classes (IFC) models. The Industry Foundation Classes (IFC) is a vendor neutral and open model that defines more than 650 entities and a few thousand attributes. Most industry software BIM tools are able to export IFC models, though there is typically some information loss. The bimserver.org platform is an open repository of IFC models and already provides a Java API to extract partial building information models from a repository.
Open query languages
Many existing database applications use the Structured Query Language (SQL), an ANSI/ISO standard with spatial extensions standardized by the Open Geospatial Consortium (OGC), as the standard language. SQL makes it possible to create, read, update and delete records in a Relational Database Management System (RDBMS). But the applicability of SQL in a BIM context is limited. SQL is based on operations on data stored in tables. Application to IFC, as a BIM example, would require storing 600 entities along with their thousands of attributes in individual tables. Severe performance and scalability issues are associated with using SQL for BIM. In addition the complexity of IFC-based queries would rapidly become too complex.
The W3C Data Activity has defined a collection of technologies comprising a “web of data” where information is easily shared and reused across applications. Key parts of this technology stack are the RDF (Resource Description Framework) data model, the OWL Web Ontology Language and the SPARQL protocol and RDF query language which has been standardized by the W3C. The Resource Description Framework (RDF) is a directed, labeled graph data format for representing information on the Web. RDF and SPARQL enables interoperability among distributed heterogeneous information systems making possible queries that span several repositories and link information from different sources. Specifically in a BIM context it enables ad hoc queries of sub models that reside in repositories maintained by the different stakeholders in a building project.
Spatial queries
BIM data models can be simple or complex. A complex data model includes logical relationships between building elements, such as windows and walls, walls and storeys, and so on. These relationships are created at design time. A simple model may not include any explicit relationships. For example, there may not be any way to determine which windows are associated with a wall except visually. Spatial queries enables relationships to be determined after the creation of the BIM model. For example, a spatial query can find all the windows in a wall, all the walls of a storey, or all the HVAC and plumbing facilities in a storey.
The efficient implementation of spatial BIM queries requires 3D spatial indexing such as octree and multi-dimensional r-tree indexes and algorithms. It has been known for a long time that spatial indexing is a key technology enabling efficient GIS systems. Very early on in the development of spatial indexes it was realized that these are domain specific. Several GIS systems support an extended spatial SQL based on quadtree or r-tree indexes. These systems evolved historically from a 2D geometric representation approach. However, the functionality for processing 3D geometry in many GIS systems is restricted and the performance of the available tools is unsuitable for complex building data sets. Therefore, it has been argued that a specialized tool is required to handle queries against elaborated BIM models containing vast numbers of elements and detailed geometry representations. Such a query language enables the spatial analysis of BIM models and the extraction of partial models that fulfill certain spatial constraints. Among other features, it includes operators that reflect the topological relationships between 3D spatial objects including "within", "contain", "touch", "overlap", "disjoint" and "equal" in 3D space. Both octrees and multi-dimensional r-tree indexes have been investigated as a basis for an efficient BIM query language.
Open BIM query language
A BIM query language, dubbed BIMQL, has been proposed as an extendable, open, domain specific query language for BIM models. It can be used to select and update partial aspects in building information models. A limited implementation of the language has been built on top of the bimserver.org platform. It is not complete, in particular it does not support spatial queries, but has provided a useful vantage point for future research, discussion and development on the development for end-user interfaces to complex BIM models as well as the composition of service-oriented architectures.
Unlike traditional data modeling approaches which are limited by the scope of their underlying schemas, RDF and related technologies can provide an open and common environment for sharing, integrating and linking data from different domains and data sources. In comparison with domain-specific query languages, SPARQL is especially applicable for scenarios when data from multiple sources are needed. Some important scenarios include
- All building objects should be classified according to the local building code
- Where are the locations of companies which produce the materials used in walls placed in the hall ?
The interesting thing about these scenarios is that they require the BIM geometry and data plus other external data. This is the type of query that the W3C semantic web technologies are designed to support.
In the AEC domain, a typical use case is data integrity validation against BIM standards or building code requirements. A Dutch example is the Dutch BIM standard requires that all building elements should be associated with appropriate building storey. Provided that the building model is represented in the standardized ifcOWL, it is possible to check this spatial containment relationship using off-the-shelf SPARQL implementation.
Currently SPARQL does not contain the vocabularies or functions required by many use cases in the construction domain. Recently researchers have proposed extending SPARQL with a set of domain-specific functions for the construction world. There are precedents for this strategy. In 2011 the Open Geospatial Consortium (OGC) released GeoSPARQL, a geographic query language for RDF data, which extended SPARQL with geospatial functions that enabled spatial queries. The advantages of this approach is that not only are the extended AEC functions compatible with existing SPARQL environments, but they can also be used to query building data combined with data from other fields.
But standard SPARQL can only crawl the data graph according to the structure of the BIM data model. There are many use cases that depend on geometric relationships that cannot be handled by off-the-shelf SPARQL. To address this SPARQL has been extended to include spatial operators "touches", "intersects", "disjoints", and "contains" and well as other domain-specific functions.
An example of a simple spatial query using a spatial extension is finding all walls which contain or adjoin doors. This requires the spatial function "touches" to find doors that are in or near walls.
As in the case of geospatial data, additional domain-specific functions are required to provide the necessary functionality. For example, functions were added for different ways of measuring distance (spt: defines the spatial extensions namespace)
- spt:distance is a function to return the shortest distance between two products in 3D space.
- spt:distanceZ is a function to return the shortest vertical distance between two products.
- spt:distanceXY shortest distance between the projections of two products on XY plane
Another example is finding all windows that are close (less than 300 units) to a column.
Implementation and testing
As a proof of concept, the extensions were implemented
based on the open source Jena ARQ query engine. An objective was to try to minimize low level coding to make the function implementations more portable and more transparent for public reviews.
As a practical example, a case study of building code compliance checking using the International Building Code 705.8.4 (IBC 2006) was tested successfully using a BIM model of a building with 4 floors.
The researchers report that the main limitations of the open SPARQL-based approach they have proposed relate to the way it was implemented. The implementation is not completely portable and performance could be improved, by integrating existing geometric libraries, for example. Future research will address these issues and investigate more use cases to extend functions for specific domains and to combine more data from different sources in the construction industry.
Sources
BIMQL – An open query language for building information models, W. Mazairac and J. Beetz, Adv. Eng. Informat. (2013)
Thanks to Léon van Berlo of TNO for pointing me to this research.