Writer Module
The GTI GTViewer Writer module will produce a GTViewer Unextracted Dataset including a .GTM file and all of the components necessary to open the dataset in GTViewer. An Extract file (.GTX) can be made from the Unextracted data (.GTM) using GTViewer or GTData utilities (GTPack or GTExtract). Also, .GTG graphics files are created as components referenced by the .GTM file and can be used independently.
The following table shows format properties for the Writer module that can be used to guide the conversion process. These properties can be used with any element type.
Property |
FME Property Name |
Description |
Value Range |
---|---|---|---|
Style Name |
gti_styleName |
Identifies the name of a style to assign to an element. This is probably the most important of the directive attributes because it can be used to create a template style map and style definition file for the converted data and will also guide the creation of the filter files based on the style names. |
String value |
Color Value |
gti_colorValue |
Identifies the color value to assign to an element. If this color is not in the current color table, it will be added and a color ID will be associated with the color. This property is different from gti_colorID which is the color ID (0 to 255) in the color table. |
<red>,<green>,<blue> component values should be from 0 to 255. |
Category ID |
gti_categoryId |
Unsigned Long value |
By default, all features are written to category ID 2 and all overview map features are written to category ID 1 (the data bounding rectangle by default). You can specify the category ID to be any number you want and can have as many as you want (within reason). Valid category ID values are any unsigned long value except 0. A separate .GTG file is create for each unique category Id used. |
Filter Group Name |
gti_filterGroupName |
String value |
This attribute is supported by the styleNameMap_byCat and styleNameMap_global Filter Creation modes. It will define which Filter Group the feature will be placed in. It can be used with the gti_filterName attribute. |
Filter Name |
gti_filterName |
String value |
This attribute is supported by the styleNameMap_byCat and styleNameMap_global Filter Creation modes. This entry will define the name of the Filter entry (id) used by the feature. It can be used with gti_filterGroupName. |
Feature Name |
gti_featureName |
String value |
This attribute can be used to change the Feature name. If it is not specified, the feature name will be the FME Feature Type for the feature. |
With the Writer module, the following rules are observed:
- A circle is written instead of an ellipse if the primary and secondary axes are the same.
- If gti_colorId and gti_colorValue are not defined, fme_color is used.
- The gti_colorId property takes precedence over gti_colorValue.
- If gti_filterId and gti_styleName are not defined, gti_styleName property is automatically assigned a unique values based on fme_feature_type.
- The gti_filterId property will take precedence over gti_styleName.
- The gti_styleName attribute will generate a unique gti_filterId for each unique style name provided.
- Use the StringConcatenator to create gti_styleName values based on fme_feature_type and any other feature attribute that could be used to drive symbology. An empty style rule will be created for each unique gti_styleName used (and these style rules can be defined later with the GTViewer Style Manager).
- A maximum of 2500 Filter IDs can be used per category (0 to 2499).
The following Parameters are used in the FME Workspace by the Writer module:
Parameter |
Description |
Value Range |
---|---|---|
Destination GTI File |
The Destination file is a location to a .GTM file that will be created. This file should generally be placed in a new subfolder because all of the component files will be generated in the same folder as the specified .GTM file. |
Valid file path. |
Coordinate Factor X1, Coordinate Factor X2, Coordinate Factor X3, Coordinate Factor Y1, Coordinate Factor Y2, Coordinate Factor Y3, |
The GTViewer data format always uses an unsigned 32-bit coordinate space. The coordinate factor parameters must be set so that the incoming data is correctly placed into this space. The following formulas are used to convert incoming data: GTViewerX = ( SourceX + CoordinateFactorX1) * CoordinateFactorX2 + CoordinateFactorX3 GTViewerY = ( SourceY + CoordinateFactorY1) * CoordinateFactorY2 + CoordinateFactorY3 It is very important to get these values correct or the data in GTViewer will wrap around the coordinate space or lose precision. GTViewer will preserve the original coordinate information by keeping track of the coordinate factors and applying them in reverse to compute the original coordinate values from the source data. For Latitude/Longitude values, use the following: X1=200, X2=1000000, X3=0, Y1=200, Y2=1000000, Y3=0 For other projections, make the multiplier (X2 and Y2) large enough to preserve the amount of precision you want to maintain. It is typically 100 or 1000 depending on the units of the source data. The X1, X2 , Y1, and Y2 are used to keep the values positive. More information is provided on setting the Coordinate Factor values in a later section. |
|
Reuse Color File |
If set to Yes, the color.txt will be loaded into memory and updated when new data is converted keeping the existing color ID’s static. If the color.txt file is not found or the parameter is set to No, then a new color file is created each time. |
Yes or No |
Background Color |
The background color in the color file can be set to White or Black with this parameter. Any color can be used if you want to set it in the color.txt file. |
White or Black |
Filter Creation Mode
|
If set to enhanced, the filter files will be created the filter ID will be grouped according by the source feature type (all style variations will be under the feature group). If set to standard, the original filter file creation will be used. Each filter id generated will be under a single group called Features. If set to either StyleNameMap mode, a Style Definition Id is created for each element based on the gti_styleName attribute. The gti_filterName and gti_filterGroupName attributes can be used to set the filter information (which is unbounded from the style rule with these modes). The ByCat mode will create a style name map for each category, and the Global mode will use one style name map for all categories. |
Enhanced, Standard, StyleNameMap_ByCat, or StyleNameMap_Global |
Use Feature Name in Stylename
|
If set to Yes, then the Feature name will be prepended to the gti_styleName field automatically and you do not have to use a Concatenator transformer to prefix the style. This option is useful if you only using only one attribute to drive symbology and you want the feature name prepended. If set to No, the Style name will be the feature name if the gti_styleName field is not set; otherwise, will be set to the gti_styleName value. |
Yes or No |