GTU0 Import Config File

GTU0 Config File Format

The config file used by the GTU0 module allows the following 'GML' feature records to be imported to create associated DGN elements:

  1. TopographicArea (creates DGN element types: Shape, Complex Shape)
  2. TopographicPoint (creates DGN element types: Cell, Shared Cell)
  3. TopographicLine (creates DGN element types: Line, Linestring, Complex Chain)
  4. CartographicText (creates DGN element types: Text, Text Node)
  5. CartographicSymbol (creates DGN element types: Cell, Shared Cell)
  6. BoundaryLine (creates DGN element types: Line, Linestring, Complex Chain)

Database Section

This has only been included for 'future' enhancements only. This section is NOT required by the current GTU0 module and does not need to exist in the config file.

The 'Database Section' allows the operator to specifiy the name of a database to connect to. The name of the database is defined in the config file as follows:

dhp11

The value 'dhp11' - between the tag defines the name of the database connection string. This is used by the UTG0 module to establish a connection to the database 'dhp11'.

NOTE: The value between the tag is the equivalent of entering the following command in the Microstation 'keyin' window:
dbdhp11

This requires an existing database 'connection' to be already established.
For example - if an 'ODBC' datasource has been setup and named as 'dhp11db1' - then the tag value would be set to:

dhp11db1

Dblinkage Section

This section needs to be set in the 'config' file - but only exists for 'future' enhancements.

In future - the config file will allow the operator to specifiy the name of a dblinkage to 'add' to any DGN elements that require a databases linkage (as a result of a new record/row being added to a specified database table).

The dblinkage is defined as follows:

NOTE:
The value of '24162' is a Microstation/DGN specific value that creates a database linkage on a DGN element for an 'ODBC' database. If a different type of linkage is to be created - then a different value would be specified. (A list of these values can be found in the Microstation 'include' file: dbdefs.h. The values specified in this file will be shown as their 'hex' value - they will need to be translated to their 'decimal' equivalant before being added as the 'dblinkage' value in the 'config' file).

Sequence Section

This section needs to be set in the 'config' file - but only exists for 'future' enhancements.

In future - the config file will allow the operator to specifiy the 'start' MSLINK value for an existing database table. This means that when a new row is added to a database table - the value specified for the MSLINK column will be taken from this sequence section (and a running count be kept until the program finishes processing/importing the GML file).

Below is a sequence section showing how the operator specifies the start 'sequences' for the database tables - 'main', 'valve':

Line 2 - This line which starts with ' i) The 'id"main"' tag/field is used to specify the name of the database table to be populated.
ii) The 'start"100000"' tag/field is used to set the start value of the MSLINK column to be populated for every database row added to the specified database table.
iii) The 'increment"1"' tag/field is used to set the value by which the 'start' MSLINK value is incremented by for every new database table row/record added.

At present the default sequence section is defined in the GTU0 config file as follows:

Symbology/Feature Section

This section allows the operator to specify how 'GML' features, identified by their 'feature codes' in the GML file, are imported and created as DGN elements.

A specific GML feature could be created/categorised as one of the following DGN elements in the 'config' file:

  1. Shape (for TopographicArea GML features)
  2. Linear (for TopographicLine and BoundaryLine GML features)
  3. Point (for TopographicPoint and CartographicSymbol GML features)
  4. Text (for CartographicText GML features)

The way that a feature is identified within the GML file (to be imported) is by the 'Feature Code' tag.

The 'config' file allows the operator to specify a specific 'feature code' section, and list the type of DGN elements that may be created for that feature.

For example - A GML 'Import' file could exists that contains the GML record types (TopographicArea, TopographicLine, TopographicPoint, CartographicText, CartographicSymbol) - all represented by a single 'Feature Code' of '1001'.

To Import all these GML features with an identical 'Feature Code' of '1001' - the 'config' file would have to contain the following section/settings:


- Line 1 containing the text GML feature to Import from the GML file to a DGN element.<br /> i) The 'code="1001" value is used to represent the 'Feature Code' tag in the GML file being 'imported'. If a 'Feature Code' with a value of '1001' is found - then depending on the GML feature type found (i.e. TopographicArea, TopographicLine etc.) - then a DGN element will be created with the settings specified.
ii) The 'active="yes" value is used to idicate that the the 'feature' indentified in the GML file is to be 'imported' as a DGN element. If 'active="No" - then even if the feature exists in the GML file - it will NOT be created as a DGN element.
- Line 2 -> 6 contain the settings for the DGN features: Shape, Linear, Cell, Text. These settings are used when these specific DGN elements types are created. A more detailed explanation of how these settings work are described in the sections below (see Shape Settings, Linear Settings, Cell Settings, Text Settings for more details).

Shape Features

As shown above - the section can contain a tag.
This section is used to specify the type of DGN element that will be created for the following GML record type(s):
TopographicArea

An examples tag could contain the following values/settings:

- Line 1 contains the 'symbology' of the Microstation Shape element to be created. The values specified after the The following 'tags' on this line must contain a value: colour, level, style, weight
NOTE:
- The 'level' must be set to a value between: 1-63

- Line 2 specifies that the 'Shape' element should be 'filled'. The 'mode' tage can be set as either: "outline" or "opaque".
i) If 'mode"outline" - then the shape will be filled with the value specified by the 'colour="0"' on the same line
ii) If the 'mode"opaque"' then the 'colour="0"' value on the same line will be ignored - but the sahpe will be filled with the 'colour=' value specified on the same line as the iii) If the tag does not exist - then the shape is NOT filled.
NOTE: The values for the 'filled' flag are 'case-sensitive' - all values MUST BE lowercase (i.e. "opaque" or "outline")

Linear Features

As shown above - the section can contain a tag.
This section is used to specify the type of DGN element that will be created for the following GML record type(s):
TopographicLine
BoundaryLine

An tag would contain the following values/settings:

- Line 1 contains the 'symbology' of the Microstation 'Linear' element to be created. The values specified after the '<linear' tag are used to 'set' the symbology of the element being created.
The following 'tags' on this line must contain a value: colour, level, style, weight
NOTE:
- The 'level' must be set to a value between: 1-63

Cell Features

As shown above - the section can contain a tag.
This section is used to specify the type of DGN element that will be created for the following GML record type(s):
TopographicPoint
CartographicSymbol

An tag would contain the following values/settings:

- Line 1 contains the 'symbology' of the Microstation 'cell' element to be created. The values specified after the '<cell' tag are used to 'set' the symbology of the element being created.
The following 'tags' on this line must contain a value: colour, level, style, weight, cellname, scale, shared
NOTE:
- The above symbology will only be set for a 'cell' element. If a 'shared cell' is created - then the operator can only specify the level for a 'shared cell'. All other symbology is taken from an existing 'shared cell' definition. The 'level' must be set to a value between: 1-63
- The 'shared' flag MUST contain a value of either: "Y" or "N". If set to "Y" a 'shared cell' DGN element will be created for this feature. If set to "N" a 'cell' DGN element will be created.
- The values for the 'shared' flag are 'case-sensitive' - all values MUST BE uppercase (i.e. "Y" or "N")
- If the 'shared' flag is "N" - then a 'cell' element will be created. For a 'cell' element the 'level' value can be set to the values: '1-63' or '-1'. A '-1' value will create the 'cell' element with the same 'level' values that exists within the specified cell library file. A value between '1-63' will set 'all' elements that 'make up' the cell - to the specified 'level'. The 'level' must be set to a value between: '1-63' or '-1'
- The 'name' value is 'case-sensitive' - all values MUST BE uppercase (i.e. "CIRCLE", "BENCHM", etc...)
- The 'name' value must specify the name of a cell contained in the attached/specified cell library that is being used by the GTU0 module. If a 'name' is specified that DOES NOT exist in the attached/specified cell library - and error will occur and translation will stop.

The following 'tags' can contain a value specified by the operator or a value of "-1" (meaning the value for this field will be taken from the GML file - if it exists): angle
NOTE:
- The 'angle' field can only be set to a value of "-1" for a feature with a corresponding GML '!CartographicSymbol' feature record. If set to "-1" its value is taken from the GML '!CartographicSymbol' records 'orientation' tag. If a value is entered by the operator then the cell will be placed at the specified 'angle/orientation' - valid values for this field are: 0-359
- The 'angle' MUST BE set for an existing GML '!TopographicPoint' feature record. If a value of "-1" is used then an error will occur because NO GML 'angle/orientation' tag exists for a GML '!TopographicPoint' feature record.
- If a value of "-1" has been used for a particular field (i.e. angle) that DOES NOT have a matching tag in the GML '!CartographicSymbol' or '!TopographicPoint' feature record - then an error will occur.

- If a cell name (i.e. CIRCLE) is specified in this section that does NOT exist in the attached cell library - then NO cell will be placed and NO warning is given by the GTU0 module. The operator must make sure that the specified cell name exists in the selected cell library.

Text Features

As shown above - the section can contain a tag.
This section is used to specify the type of DGN element that will be created for the following GML record type(s):
CartographicText

An tag would contain the following values/settings:

UorPerM?="1000" textNode="auto"/>

- Line 1 contains the 'symbology' of the Microstation 'text/textnode' element to be created. The values specified after the '<text' tag are used to 'set' the symbology of the element being created.
The following 'tags' on this line must contain a value: colour, level, style, weight, font, just, hwRatio, angle, linespace, UorPerM, textNode
NOTE:
- The 'level' must be set to a value between: 1-63
- The 'textNode' flag MUST contain a value of either: "always", "never", "auto". If set to "always" a 'text node' DGN element will be created for this feature. If set to "never" a 'text' DGN element will be created. If set to "auto" - then if a 'single' text tag exists then a 'text' DGN element will be created. If multiple text tags exists within a single GML feature record - then a 'text node' DGN element will be created.
- The values for the 'textNode' flag is 'case-sensitive' - all values MUST BE lowercase (i.e. "always", "never", "auto")
- The 'hwRatio' and '!UorPerM' values are used as a scaling factor for the GML '!CartographicText' records 'height' tag.
- The 'linespace' value is used to specify the 'linespacing' between 'text' elements for a DGN 'text node' element.

The following 'tags' can contain a value specified by the operator or a value of "-1" (meaning the value for this field will be taken from the GML file - if it exists): font, just
NOTE:
- The 'just' tag retrieves its value from the GML '!CartographicText' records 'anchorposition' tag. If a value is entered by the operator - valid values for this field are: 0-8
- The 'font' tag retrieves its value from the GML '!CartographicText' records 'font' tag.
- The 'angle' tag retrieves its value from the GML '!CartographicText' records 'orientation' tag. If a value is entered by the operator then it will be placed at the specified 'angle/orientation' - valid values for this field are: 0-359
- If a value of "-1" has been used for a particular field that DOES NOT have a matching tag in the GML '!CartographicText' record - then an error will occur.

Default Section

If required a 'default' section can be setup - this allows ALL records feature records within a GML file to be created as DGN elements - even if the individual 'feature codes' are not known for specific GML features.

The following section could be included in a config file - if ALL GML features needed to be imported/created as DGN elements:

UorPerM?="1000" textNode="auto"/>

NOTE: If a cell name (i.e. CIRCLE) is specified in this section that does NOT exist in the attached cell library - then NO default cell will be placed and NO warning is given by the GTU0 module. The operator must make sure that the specified cell name exists in the selected cell library.

Example GTU0 Config File

UorPerM?="1000" textNode="auto">

UorPerM?="1000" textNode="auto"/>

Topic revision: r1 - 12 May 2011 - 12:00:02 - WikiGuest
 

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback