IFCtoRDF is a set of reusable Java components that allows to parse IFC-SPF files and convert them into RDF graphs.
This code does not have a Graphical User Interface (GUI). It relies on maven, so the code needs to be compiled using maven first. It can be run using the command line interface:
To convert an input file (IFC-SPFF) to an output file (TTL):
java -jar IFCtoRDF-0.3-SNAPSHOT.jar [--keep-duplicates] <input_file> <output_file>
or to convert all the IFC-SPFF files in an entire directory:
java -jar IFCtoRDF-0.3-SNAPSHOT.jar [--keep-duplicates] --dir <directory>"
The output RDF graphs follow the ifcOWL ontology, of which a number of versions are available:
- https://standards.buildingsmart.org/IFC/DEV/IFC2x3/FINAL/OWL/
- https://standards.buildingsmart.org/IFC/DEV/IFC2x3/TC1/OWL/
- https://standards.buildingsmart.org/IFC/DEV/IFC4/ADD1/OWL/
- https://standards.buildingsmart.org/IFC/DEV/IFC4/ADD2/OWL/
- https://standards.buildingsmart.org/IFC/DEV/IFC4/ADD2_TC1/OWL/
- https://standards.buildingsmart.org/IFC/DEV/IFC4/FINAL/OWL/
- https://standards.buildingsmart.org/IFC/DEV/IFC4_1/OWL/
Each of these ontologies rely on the EXPRESS and LIST ontologies:
https://pipauwel.github.io/IFCtoRDF/0.3/apidocs/
This code relies on two other libraries, namely an EXPRESStoOWL library and IFCParserLib library.
Include the IFCtoRDF in your Java / Maven project using the POM file:
<!-- https://mvnrepository.com/artifact/com.github.pipauwel/IFCtoRDF -->
<dependency>
<groupId>com.github.pipauwel</groupId>
<artifactId>IFCtoRDF</artifactId>
<version>0.3</version>
</dependency>
This repository also contains the test files used for this code, including the expected logs. These files are used for the maven unit testing and can hence be found in the src/test folder. These are small samples, but they cover most of the code and most of the most common cases in IFC-SPFF files used in the construction industry.
Please report bugs and errors ([email protected]) - your input in making this code better is highly appreciated.