Hexagon MGE Reader/Writer

FME can read and write design files and their associated databases.

Note  The Hexagon MGE Reader/Writer is nearly identical to the (Bentley) MicroStation GeoGraphics Reader/Writer. The only difference is that by default, the format abbreviation (shortname) for the GeoGraphics reader is GG.
This chapter contains information that is applicable to both MGE and GG formats.

Hexagon MGE Product and System Requirements

Format

FME Platform

Operating System

Reader/Writer

FME Form

FME Flow

FME Flow Hosted

Windows 64-bit

Linux

Mac

Reader

Yes

Yes

Yes

Yes

Yes

No

Writer

Yes

Yes

Yes

Yes

Yes

No

Overview

MGE uses standard MicroStation elements to represent the graphical portions (geometry) of the geographic map objects. These elements are identical to the design file elements used by the Bentley MicroStation Design Reader/Writer (IGDS). Any geometry enhancements made to the IGDS format also benefit the MGE Reader/Writer.

The non-graphical aspects of a map object are defined by linking an MGE feature to elements in a database. Features are linked to elements in the database via pairs of entity and mslink numbers. Feature definitions are stored in a special table within the project’s database. Each row of the feature table defines a feature, providing a name, feature code, feature type, display attributes (to be applied to elements linked to that feature), and possibly a pointer to a table of non-graphical attributes to be associated with each instance of the feature.

Note  A feature in Hexagon MGE is closer in nature to a feature type in FME terminology. In this chapter, we refer to FME’s features using the term “FME features” to differentiate it from MGE’s features.

The following table describes the general database tables used. Other tables not listed are non-graphical user attribute tables. The mscatalog and feature tables are mandatory for the database used.

Table Name

Description

mscatalog

The key table to determine where there are more attributes to the feature in the other tables.

feature

This table holds all the feature types and the general feature information.

maps

The table contains the corresponding map information associated with the feature.

category

This table holds information about the categories associated with the feature.

ugfeature, ugcategory, ugjoin_cat, ugmap, ugcommand, ugtable_cat

Extended tables of the Hexagon Design format table that hold additional information for MGE.

Reader Overview

The MGE reader extracts all elements from the design files, one at a time, via the help of the Design File Reader. For each element, it finds every attached feature and passes each on to the rest of the FME for processing, along with any corresponding non-graphical attributes. Complex elements are extracted as single FME features. If the element has any attribute linkages attached to it, these are read in and added as attributes to the FME feature created.

When the MGE reader encounters an element type it does not recognize, it is processed as an “unlinked” element type.

Writer Overview

The MGE writer writes all elements to the current master file. It extracts the conversion parameters required to translate coordinates from feature coordinate units to internal Units of Resolution (UORs). It also determines the dimension of the master file.

When writing to GG/MGE, one of the Data Source types from ODBC, MDB or ORACLE has to be selected. Against the Database Server Name, an empty database has to specified which the writer uses to write all the tables like mscatalog, feature, etc. For instance, with Access (MDB) as the data source, an empty database .mdb or .accdb file would suffice. When an existing database is used, new records are appended to the existing tables. The username and password are optional and may or may not apply in every case.

A cell library file may optionally be used by the MGE writer. Cell libraries contain named symbol definitions which can be used to depict point features. If a cell library is specified, the MGE writer reads in all the cell definitions for later when cell features are output. The MGE writer can use either 2 or 3 dimension cell libraries, and will automatically convert the cell definitions to be of the correct dimension for output.

The MGE writer then outputs each FME feature it is given. Most often, a single FME feature corresponds to a single design element. However, some of the IGDS element types cause several elements to be output as a complex unit (with the complex bit turned on). This occurs when a multi-line text object, a cell, or a closed shape or linear feature with more than 101 coordinates is output. The MGE writer hides all of the details of complex element output.

Tip  Since coordinates in design files are ultimately stored as integer UORs, it is possible for precision to be lost or overflow to occur when they are output. Care must be taken to ensure that the conversion parameters in the seed file preserve the data precision and range.