BIM to OSM
This open source project wants to make Building Information Model (BIM)
data available for OpenStreetMap (OSM).

Questions about the development? - Check the Development section
Want to contribute? - Have a look at our Contribution guidelines
See also
Questions about the development? - Check the Development section
Want to contribute? - Have a look at our Contribution guidelines
See also
- OSM wiki: Building Information Modeling
- Simple Indoor Tagging schema
- JOSM indoor mapping tool IndoorHelper Plugin
Usage
Quickstart
Add BIMtoOSM to your Gradle build
dependencies {
implementation(WIP)
}
Configurate and run the parser
// Setup default configuration
val defaultConfig = Configuration()
// Init parser
val parser = BIMtoOSMParser(defaultConfig)
// Parse BIM file
val osmData: BIMtoOSMParser = parser.parse("path-to-file.ifc")
// Access the data: see section 'Full Setup & Configuration' below
API
Caution: Currently, the source code is being rebuilt from scratch and the API might change!
Class
/**
* Configure the parser
* @param config parser configuration
*/
fun configure(config: Configuration)
/**
* Parse BIM file placed at [filepath] to OSM data
* @param filepath BIM file
*/
fun parse(filepath: String): OSMDataSet
/**
* Gives information about current parser status
*/
fun status(): String
/**
* Export data to .osm file located at [filepath]
* @param filepath to export location
* @param data [OSMDataSet] to export
*/
fun export(filepath: String, data: OSMDataSet)
Use with JOSM
Caution: Currently JOSM is using an old version of BIMtoOSM!
The parser is integrated into JOSMs IndoorHelper plugin.
To use the GUI you need to install JOSM and download the IndoorHelper plugin via 
See also fullscreen demo
Full Setup & Configuration
// Setup configuration (description see below):
// costumized
val config = Configuration(
solution = GeometrySolution.BOUNDING_BODY,
optimizeInput_RBC = true,
optimizeInput_RBL = true,
optimizeOutput_DS = true,
optimizeOutput_DSMD = 0.05
)
// or default
val defaultConfig = Configuration()
// Init parser
val parser = BIMtoOSMParser(config)
// Parse BIM file
val osmData: BIMtoOSMParser = parser.parse("path-to-file.ifc")
// Export OSM data
Exporter.exportOSM("bim-to-osm.osm", osmData, true)
Configuration
solution
:
Set to optimizeInput_RBC
Optimize the input by removing all block comments (RBC) from input file. Block comments might cause errors while deserializing. Set optimizeInput_RBL
Optimize the input by removing all blank lines (RBL) from input file. Blank lines might cause errors while deserializing. Set optimizeOutput_DS
Reduce the complexity of OSM output data by merging close nodes and overlapping areas. This will reduce the OSM data set size (DS). Set optimizeOutput_DSMD
Set merge distance (MD) for
solution
:GeometrySolution.BOUNDING_BOX optimizeInput_RBC
:false optimizeInput_RBL
:false optimizeOutput_DS
:false optimizeOutput_DSMD
: -
How to access the data
// Data
val osmData: OSMDataSet
// Access data
// Example: get all nodes of data set
val nodes: ArrayList<OSMNode> = osmData.nodes
// Example: get all information about OSMNode
val firstNode: OSMNode = nodes[0]
val nodeId: Long = firstNode.id
val nodeX: Double = firstNode.x // longitude
val nodeY: Double = firstNode.y // latitude
val nodeTags: ArrayList<OSMTag> = firstNode.tags
// Example: get information about OSMTag
val firstTag: OSMTag = nodesTags[0]
val key: String = firstTag.k
val value: String = firstTag.v
// Example: get all ways of data set
val ways: ArrayList<OSMWay> = osmData.ways
// Example: get information about OSMWay
val firstWay: OSMWay = ways[0]
val wayId: Long = firstWay.id
val wayPoints: ArrayList<OSMNode> = firstWay.points
val wayTags: ArrayList<OSMTag> = firstWay.tags
Supported IFC Schema
The parser currently supports the IFC4 and IFC2x3 TC1 schema
Development
Dependencies
IFC to OSM translation
To transfrom IFC to OSM data we'll need to filter a lot of information by reducing object dimensions from 3D to 2D. The following basic IFC entities will be translated:IFC Geometry information
Area -indoor=area
- IfcSlab, IfcSlabStandardCase, IfcSlabElementedCase
- IfcColumn
indoor=wall
- IfcWall, IfcWallStandardCase, IfcWallElementedCase
door=yes
- IfcDoor, IfcDoorStandardCase
highway=steps
- IfcStair
- WIP
IFC Material information
Not supported right nowMore infos see section BIM & OSM
Workflow - parsing data
The following steps are performed during transformation:
Pre-processing
1. Optimize ICF file: Block comments and blank lines will be removed fromLoading
2. Extract IFC environment variables: Environment variables like length, area, volume or angle units and level tags will be extracted3. Filter and pack data: Filter the IFC data following the translation schema as described above (use basic IFC entities only)
Parsing
4. Transform to BIM objects: Transform deserialized entities to internal BIM objects with resolved geometry information. For this step the configuration can be set to two different solution engines:5. Transform to WCS: Transform coordinates of geometry information to World Coordinate System if possible
6. Transform BIM to OSM objects: Transform internal BIM objects into OSM objects
Post-processing
7. Optimize OSM data: Optimize the data complexity. Merge close nodes or overlapping areas. This step is optional and can be set by configurationTest data
Test data for development is placed at repository IfcTestFiles. The repository includes ifc test files and already resolved geometry data.BIM & OSM
This open source project wants to make Building Information Model (BIM) data available for OpenStreetMap (OSM).
OSM & indoor data
With OSM you can handle not only outdoor data. A large number of projects focus on the representation of indoor data in OSM. These data might be used for indoor localization and navigation.How to create and view indoor data in OSM?
There are several OSM editors. To handle indoor data JOSM might be a good choice. Note: To use JOSM, a JDK needs to be installed.JOSM is an extensible editor for OpenStreetMap (OSM) for Java 8+. |
![]() |
To create, validate and view indoor data correctly, there is a JOSM plugin called IndoorHelper. Check out the quickstart gif or docs. |
![]() |
To use georeferenced images for mapping, JOSMs PicLayer plugin makes it possible to load images into JOSM and calibrate them. Check out the quickstart gif or docs. |