Converting CAD Datasets to IMDF: Part 3

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

  • FME 2018.x

Introduction

This is the final article in a three-part tutorial series about how to convert AutoCAD DWGs to Indoor Mapping Data Format (IMDF). This workspace will take the cleaned and edited DWG file, georeference it and then convert it to IMDF following the naming convention guidelines.

Please note that this article is for demonstration purposes only in Windows. The data is not supplied. If you require data please see the Scenario: Victoria Airport Esri Geodatabase to IMDF article

 

Requirements

Windows Operating System

Converting CAD Datasets to IMDF: Part 2 completed

AutoCAD ( for Part 2 )

Google Earth ( optional for Part 2)

 

Before You Begin

Before you begin, you will need to have your floors aligned with specific IMDF attributes created which was completed in Part 1. You will also need to have manually cleaned up and created a georeference point which was completed in Part 2.

 

Workspace Overview

Part 3: Create IMDF

This workspace creates the IMDF file from the DWGs. Before writing out to IMDF, the features need to be cleaned up further with more IMDF specific attributes created. The features also need to be restructured into the IMDF hierarchy: venue, address, building, footprint, level, unit, and opening.

 

Reading in the Cleaned Data

The beginning section of MakeIMDF.fmw workspace is the same as the PreProcess.fmw up until the FeatureMerger. The only difference is that it now reads in the new Locate.dwg file which was created in AutoCAD in Part 2.

 

Creating the Building ID

A Building ID needs to be created, which is stored as a variable to be referenced by each feature. When running this workspace, ensure to run it without Feature Caching enabled.

To create the Building ID, a Sampler transformer is used to take one feature and create a UUID for it. Then a VariableSetter transformer is used to create the variable named building with the value of _uuid. The Building ID will be retrieved later using the VariableRetriever.

buildingid.png

Workspace section overview for creating the Building ID

 

Filtering Layers

Next, each layer file has the naming convention <level>_<layer> that was set up in PreProcessing.fmw. These layers need to be separated into individual attributes. This is done by using the AttributeSplitter and AttributeCreator to create _level and _layer attributes. Each of these layers is then assigned a unique id to each attribute.

uniqueid.png

Layers separated into individual attributes viewing in the FME Data Inspector

 

An AttributeFilter is used to separate out each layer so they can be manipulated independently. The layers are filtered by:

  • Level
  • Unit
  • RM$TXT
  • Column
  • OpenToBelow

 

Preparing each layer

Level:

For this demo, each level has an ordinate at the end of the file name. An ordinal attribute is created with the combination of the StringSearcher, AttributeTrimmer, and AttributeCreator. Then other attributes are created: category, outdoor, name, and short name. The name is the level number, for example, 03, which would be the third floor. The building variable is retrieved and attached to each level.

levelsattributes.png

Attributes for the Levels layer after splitting attributes

 

Finally, the georeferencing is applied with the custom transformer ApplyGeoreferencing, which is the same method that was done in the PreProcessing.fmw processing workspace (part 1), it is just wrapped up in a custom transformer to clean up the workspace.

levelcreate.png

Workflow section overview to prepare levels

 

Units:

There are three steps to preparing the units (rooms). First, each unit needs to have the correct geometry, this is accomplished by using a LineCloser and a DonutBuilder to create each unit. This step is important because it ensures that each unit is a complete polygon.

The second part is manipulating the text associated with each unit. The attributes are merged by overlaying the RM$TXT over the units using the PointOnAreaOverlayer. Then the text is rotated and aggregated to extract the number for each unit. The text contained in RM$TXT is extracted and stored in attributes for each unit.

The third and final part is associating each unit with the appropriate level, and georeferencing.

units.png

Georeferenced and cleaned up units view in the FME Data Inspector

 

Openings:

To prepare the openings, first they need to be filtered from the rest of the layers. Once they have been filtered out, only the line geometry is used. A SpatialFilter is used to determine whether the openings are interior or exterior. If they are interior, they are assigned the attribute pedestrian. If they are exterior, they are assigned the attribute pedestrian.principal. Finally, the openings are georeferenced to real-world coordinates.

openings.png

Openings in red are exterior openings with the attribute pedestrian.principal, viewed in the FME Data Inspector

 

Venue:

To create the boundary of the building area, a BoundingBoxAccumulator transformer is used. Then metadata attributes that contain information about the venue, like name, phone number, and website are created.

venueboundary.png

Venue bounding box, viewed in the FME Data Inspector

 

Address:

Use two AttributeCreators to create attributes that contain the address, like street address, city, country, and postal code. Depending on the scope of the data there might be different addresses for both the building and venue.

addresses.png

Two different address attributes for this example dataset

 

Building:

Create attributes for the Building that contains the building name and category.

 

Footprint:

Create the footprint for the building, first, filter it by category, ground, subterranean and aerial. Then dissolve the areas into a single area.

footprints.png

Building footprints by category. Red is aerial, blue is ground and green is subterranean. Viewed in FME Data Inspector.

 

Writing out to IMDF

When writing out to IMDF one single zip file is created that contains GeoJSON files for each of the separate feature types: levels, units, openings, venue, address, building, and footprints. Before sending the IMDF off to be published the data should be validated to check for any errors or warnings that may exist in the data.

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.