Google Summer of Code/2020/BIM Import

From OpenStreetMap Wiki
Jump to navigation Jump to search
Source Code: Octicons-mark-github.svg

This page is about the GSoC project IndoorHelper Plugin: BIM import. Here you can find all information about the current state as well as the project plan and the source code link. Please notice that the page will be updated during the project time.


Rebecca Schmidt
More links: Openstreetmap logo.svg Wikilogo.png Octicons-mark-github.svg


BIM (Building Information Modeling) data is a well known concept of handling even complex building data. Within this project an already existing JOSM plugin named IndoorHelper will be extended by a function to import BIM data. The imported data will fit into the SIT- schema what means the focus will be on indoor data.

Idea BIM2OSM.png

The image above shows an idea of importing BIM data. Data will be rendered on a separat layer and levels can be accessed by AutoFilters Action.

Development Steps

This is an overview of the basic work steps which needs to be done to reach a working BIM import feature.

Basic steps.png


These are the tasks which will be done until the evaluation dates.

First Evaluation (June 29 - July 3):

  • IFC (Industry Foundation Classes) structure objects will be parsed into java objects with using STEP (Standard for the Exchange of Product Model Data) parser. This process will be tested on at least three different .ifc files with different content.
  • An IFC -SIT object translation schema will be presented on wiki to get a consistent way to handle IFC objects in OSM. The schema will define which IFC tag belongs to which SIT tag.

Second Evaluation (July 27 - 31):

  • Internal data structure holding IFC data will be converted to OSM objects (using defined translation schema)
  • The data will be saved in an .osm file and displayed as separat layer in JOSM

Final Evaluation (August 24 - 31):

  • The completed feature will be integrated in JOSM and accessible for the user

Tasks Timeline

This timeline shows all planned and completed steps needed to reach the milestones (for more specific information about java classes see source code architecture below).
Task state: done , open

Period of time Tasks
June 01 - 07
  • Project setup
    • June 01 : Project setup on Github //320689f Octicons-mark-github.svg
    • June 06 : Add gradle to project for better workflow //632d3d2Octicons-mark-github.svg
  • Look for open source STEP-parser libraries and evaluate them
    • June 02 : Choose BuildingSMARTLibrary as parser library for project
      Note: Library is not up-to-date and no proper documentation could be found but will be used because no other is available. Also I opened a ticket regarding this issues: BuildingSMARTLibrary/issues/1
June 08 - 14
  • Create major java classes (MVC pattern) : ImportDataController, ImportDataModel, ImportBIMDataAction
    • June 06 : Add MVC classes for BIM import on new branch //1b67521Octicons-mark-github.svg
  • Create class BIMtoOSMParser and integrate open source STEP-parser
    • June 07 : Create parser class and integrade STEP-parser library; Handle exceptions //18ecb12Octicons-mark-github.svg
      Info: Parser supports following IFC schema: IFC2X3, IFC4 (see Feature Notes)
June 15 - 21
  • Parse .ifc file data into internal data structure
    • June 07 : BIM data parsed into internal data structure from parser library; Data can be accessed //18ecb12Octicons-mark-github.svg
    • June 08 : Handle parser exceptions: Check if IFC schema is supported; Show error dialog if something went wrong //c98605eOcticons-mark-github.svg
      Note: Sometimes parser throws exception even if file schema is supported. For now this case is handled by an error dialog.
  • Improve feature usability
    • June 08 : Show progress bar while loading .ifc files; Put file loading/parsing tasks on separat thread //c98605eOcticons-mark-github.svg
  • Write Unit Tests
    • June 08 : Create class BIMtoOSMParserTest and write unit tests: Check if supported .ifc files can be loaded and unsupported files will be handled properly //c98605eOcticons-mark-github.svg
      Info: The parsing is tested on 8 different files: 2xIFC2X3 schema (works), 3xIFC4 schema (works), 1xIFC4 schema corrupted (works - exception handling shows error dialog), 1xIFC4X2 schema and 1xIFC4X3 schema (not supported - exception handling shows error dialog) (see Feature Notes)
June 22 - 28
  • Create and publish the IFC-SIT object translation schema on wiki
    • May 31 : First schema created and published at: Wiki:BIM
  • Documentation
June 29 - July 03 First Evaluation
June 29 - July 12
  • Filter SIT relevant data with using created translation schema
    • June 12 : Create BIMtoOSMCatalog and filter relevant BIM data with using the catalog //36a004aOcticons-mark-github.svg
  • Prepare filtered data and transform coordinates into WGS84
    • June 14 : WIP: Prepare filtered BIM data: Extract global origin coordinate of each object //d43b643Octicons-mark-github.svg
    • June 15 : Clean code changes: Put all parser methods in new class BIMtoOSMHelper to keep it readable //6408d1fOcticons-mark-github.svg
    • June 21 : Global origin coordinates extracted; WIP: Prepare filtered BIM data: Extract shape data of BIM objects //cd80eb7Octicons-mark-github.svg
      Info: (see Feature Notes and Feature Issues)
    • July 04 : Clean code changes //7e7371cOcticons-mark-github.svg
    • July 06 : WIP: Prepare filtered BIM data: Support IfcExtrudedAreaSolid and IfcFacetedBrep objects and render results temporary //f057088Octicons-mark-github.svg
      Simple example of current state: Convert simple sample.png
    • July 11: WIP: Prepare filtered BIM data: Extract rotation matrix and handle rotation of IFC objects //d90232eOcticons-mark-github.svg
      Simple example of current state: Current state rotation handling.png
    • July 17: WIP: Prepare filtered BIM data: Support IFCBooleanResults (difference) for popular entities //7ef894cOcticons-mark-github.svg
    • July 19: WIP: Prepare filtered BIM data: Support IFCOpeningElements in shapes; Prepare IfcDoor and IfcWindow support //0dd2a87Octicons-mark-github.svg
    • July 20: WIP: Prepare filtered BIM data: Add level tag data to objects //46db4d4Octicons-mark-github.svg
      Info: At this state door/window support got disabled (see Feature Issues)
      Simple example of current state: Current state dev.png
    • July 24: Separate parser code from plugin code //3cd6158Octicons-mark-github.svg
    • July 25: Transform local coordinates to geodetic coordinates //ebe697bOcticons-mark-github.svg
    • July 25: Fixing level assignment //2c2122cOcticons-mark-github.svg
    • July 25: Small changes: Support length units (cm, mm); Error handling //e447934Octicons-mark-github.svg
July 13 - 19
  • Pack filtered BIM data into OSM format and create an .osm file (for now)
    • July 26: Done with temporary rendering at //f057088Octicons-mark-github.svg; Imported data can be saved by JOSM-save action as .osm file
  • Write Unit Tests
    • July 26: No Unit Tests required; Data will be tested by temporary rendering in JOSM
      Simple examples of current state: Example1 July 26.png Example2 July 26.png
      Info: See open issues at Feature Issues
July 20 - 26
  • Documentation
July 27 - 31 Second Evaluation
July 27 - August 09
  • Create class ImportDataRenderer
    • August 02: Add ImportDataRenderer; Improve usability //2100429Octicons-mark-github.svg
  • Render parsed .osm data on separat layer
    • August 02: Add ImportDataRenderer; Improve usability //2100429Octicons-mark-github.svg
August 10 - 16
  • Write Unit Tests
    • August 16: For now no unit tests are required; The data will be tested by rendering.
August 17 - 23
  • Evaluate and adjust
    • July 28: Add logfile handler: Add logfile for issue handling and further development //4f40616Octicons-mark-github.svg
    • August 10: Clean code changes //56d7c9eOcticons-mark-github.svg
    • August 16: Refactoring and Issue-Handling: //de6e87eOcticons-mark-github.svg
      Please note that there are still some issues to fix, see GitHub Issue BoardOcticons-mark-github.svg
    • August 21: Re-license plugin to AGPL to make it compatile with BuildingSMARTLibrary license //8e95056Octicons-mark-github.svg
August 24 - 31 Final Evaluation

Feature Specification

User Interface

A new menu entry will give you access to the import function.

Source Code Architecture

The following diagram will give an idea of what is planned to implement the feature. This diagram might be modified while coding.

BIM import architecture.png

Feature Notes

  • Supported IFC schema
  • Parsing the data will be done in two steps:
  1. Use BuildingSMARTLibrary to parse IFC objects like IFCWALL, IFCDOOR etc. in data structure including ids to associated IFC objects/items
    Example: #1644= IFCWALL('asdas3432453terf',#16,'Wand',$,$,#1684,#1458,'61-2423e'); --> [GlobalId: 'asdas3432453terf', OwnerHistory: #16, Name: 'Wand', Description: $, IsDefinedBy: $, ObjectPlacement: #1684, Representation: #1458, Tag: '61-2423e'] - The array elements can be accessed by identifier string
  2. The parsed IFC objects are associated with other IFC objects/items. At this step the IFC object attributes ObjectPlacement and Representation will be used to find information about origin and shape of the object. For this the IFC structure needs to be scanned to the root element to get information of relative objects

Feature Issues

More Feature Ideas

Final GSoC Project Report

Within this project an already existing JOSM plugin named IndoorHelper got extended by a function to import and translate BIM (Building Information Modeling) data. The imported data fits into the SIT schema.

What is done

  • Import functionality
    1. The BIM data will be filtered to handle OSM relevant data only
    2. The BIM data will be translated to OSM data using the SIT schema
    3. Metric coordinates of the new OSM data will be translated into WGS84 (Caution: This still needs to be tested!)
    4. OSM data of the building will be rotated in WCS (Caution: This still needs to be tested!)
  • Specification/Limitation
    • The import functionality supports .ifc files of file schema IFC2X3 and IFC4
    • The import functionality uses the third-party library BuildingSMARTLibrary
    • The plugin writes the logging output into a logfile located at C:\tmp\.josm\logfile_indoorhelper.log. This file can be used for further development
    • The developed state of import functionality is a beta version. There are still some issues open and things to do!
  • UI
    • Accessible via menu entry (see IndoorHelper/BIM-Import)
    • The import functionality shows a progress bar while loading .ifc files (necessary for large files, the import can take a while)
    • The import functionality shows info boxes if something went wrong or something is not supported
  • Code location
  • Additional
    • Gradle added to the project
    • Migrated from SVN to GitHub

What needs to be done

Open tasks and project can be found on GitHub Issue BoardOcticons-mark-github.svg and GitHub Project BoardOcticons-mark-github.svg


Source code:
GSoC project page: IndoorHelper Plugin: BIM import
IndoorHelper wiki: Plugins/indoorhelper
BIM specification: Wiki: Building Information Modeling