Reading MicroStation (DGN) Tags with FME

Liz Sanderson
Liz Sanderson
  • Updated

FME Version

Introduction

Tags are a MicroStation feature that allows the user to attach non-spatial attribute information onto DGN elements. To read this information as FME attributes, some specific parameters can be set in the reader. In this example, the element has two tags attached to it (Species and Tree Count):
http_download_1444329582523_6032.png

 

Step-by-Step Instructions

1. Add DGN Reader

Start FME Workbench. On the Start Page, select New Workspace to create a blank canvas.

Add a Reader to the workspace (from the Readers menu select Add Reader).

Set the Format to Bentley MicroStation Design (V8)

Set the Dataset to TreeTextNodeLabelsWithTags.dgn, which can be downloaded from the downloads section. Open the Parameters dialog box.

1-add-dgn-reader.png

When adding a DGN reader to a workspace, the parameters dialog has an option, “Group Elements By” that controls how DGN elements are grouped in FME Workbench. Select Schema - Level Names for Group By Elements. This will create an Attribute for each DGN Level.

1-dgn-parameters-group-by.png

Choosing any value of the "Schema" type will result in exposing DGN tags as attributes in the FME workspace. As you can see, when the Reader is added to the canvas, there are more attributes exposed other than just the levels, such as igds_color.

1-dgn-attributes-exposed.png

 

2. Exposing Attributes
Notice that not only are the tags (here Species and Tree Count) exposed, but also attributes with information on the tags, such as the tagset name, the tag type, and the default value. If you need to have a list of tag names, you can expose the igds_tag_names{} format attribute by clicking on the Trees Parameters cogwheel. This will open the Parameters dialog box. Click on the Format Attributes and find the attribute you wish to expose and click the checkbox next to the attribute.

2-exposing-attributes.png

The tag attributes created within FME are defined using the same data types as in the original tags:

2-user-attributes.png

I.e. a character tag in MicroStation will be created as an FME attribute with a character (string) data type; similarly, a numeric tag in MicroStation becomes a numeric attribute in FME. The width of the field depends upon the attribute content.
 

3. Data Ready for Use
Now the information is available to use within FME Workbench, just like any other user attribute in this case, we use an AttributeFilter to filter the trees by species name.

3-ready-for-use.png

Note: FME is only able to read tags that have an associated value with the tag.
 

Data Attribution

The data used here originates from open data made available by the City of Vancouver. It contains information licensed under the Open Government License - Vancouver.

 

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.