Feature Representation

In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Attributes), this format adds the format-specific attributes described in this topic.

Special attributes direct the VML writer as it writes the features into the VML file. The most important of these is the vml_type attribute which controls the interpretation of the feature. Acceptable values for vml_type are vml_text, vml_polyline, vml_polygon, and vml_point.

User-defined attributes are ignored by the VML writer. Limited user attribution can be output in the VML file by using the vml_title attribute or the vml_url attribute allowing a feature to have a URL link which may point to some external data source.

Some VML feature attributes have data type VML boolean, VML number, or VML color. The value for these attributes are copied directly from the FME mapping file to the VML output file, and therefore must conform to the VML specification. The following table lists the VML data type specification for these attributes.

Data Type

Description

VML boolean

An attribute which can take true and false values.

The following directives are defined for VML.

Value for true:true | yes | on | t | 1

Value for false: false | no | off | f | 0

VML number

Numeric data used for values that are integer or fractional numbers and for values that specify lengths. Lengths and numbers follow the lexical form defined for CSS with a suffix indicating a scale factor.

VML color

The full set of values are taken from HTML, CSS1, and VML specification.

Example: HTML defines the following 16 colours.

black | silver | gray | white | maroon | red | purple | fuchsia | green | lime | olive | yellow | navy | blue | teal | aqua

Example: Using the CSS1 rgb form

“rgb(red,green,blue)” where red, green, and blue are values in the range of 0..255.

The following table lists the attributes that are common to all VML features:

Attribute Name

Contents

vml_color

The color of the brush used to stroke the feature.

Range: VML color

Default: black

vml_weight

The width of the brush used to stroke the feature.

Range: VML number

Default: 0.75pt

vml_title

The title of the feature that may be displayed by the VML viewer.

Range: string

Default: None

vml_url

The URL to jump to if this feature is clicked on.

Range: string

Default: None

vml_target

The target frame in an URL.

Range: string

Default: None

vml_z_index

The z-index of the feature in the output VML file. Positive numbers are in front of the screen. Negative numbers are behind the screen. Features having a higher z-index obscure features with lower z-index.

Range: integer

Default:

0 (for vml_polygon features)

10 (for vml_polyline features)

11 (for vml_point features)

12 (for vml_text features)

vml_fill_color

The color of the brush used to fill the feature. This attribute is not applicable for vml_polyline features.

Range: VML color

Default:

black for points and text

No Default for polygons

vml_fill_attr{#}

This list attribute allows the feature to be filled with customized effects. If a feature has this list attribute the VML element that represents the feature in the output file will contain a VML fill sub-element. The contents of the vml_fill_attr{#} list attribute must be of the following form: <attribute-name>=<attribute-value>

Where <attribute-name> is a name of an attribute for the VML fill sub-element, and <attribute-value> is one of the possible values for that attribute name. Please refer to the VML specification for all the possible attributes that the VML fill sub-element may contain. The VML specification may be found at http://www.w3.org.

For example, to specify that a feature is filled with a gradient and blue color add the following vml_fill_attr{#} list attribute with the following values to the feature:

vml_fill_attr{0} “type=gradient”

vml_fill_attr{1} “color=blue”

NOTE: If the above string values contain spaces then they must be enclosed between double quotes.

Also note that the index for the vml_fill_attr{0} must start from 0. The order in which the attributes are listed in the list attribute is of no importance.

Range:

<attribute-name>=<attribute-value>
as described above

Default: No Default

vml_stroke_attr{#}

This list attribute allows the feature to be render with a customized outline. The values for this list attribute is similar to the vml_fill_attr{#} described above with the values for the <attribute-name> and <attribute-value> taken from the VML stroke sub-element instead.

Example, to specify that a feature should be render with a dotted blue line add the following vml_stroke_attr{#} list attribute with the following values to the feature:

vml_stroke_attr{0} "color=blue" vml_stroke_attr{1} "dashstyle=dot"

Range: <attribute-name>=<attribute-value>

Default: No Default

vml_shadow_attr{#}

This list attribute allows the feature to be render with a shadow effect. The values for this list attribute is similar to the vml_fill_attr{#} described above with the values for the <attribute-name> and <attribute-value> taken from the VML shadow sub-element instead.

Example, to specify that a feature should be render with a dotted blue line add the following list attribute with the following values to the feature:

vml_shadow_attr{0} "on=true" vml_shadow_attr{1} "type=perspective"

Range: <attribute-name>=<attribute-value>

Default: No Default

vml_imagedata_attr{#}

This list attribute allows the feature to have a picture render on top of it. The values for this list attribute is similar to the vml_fill_attr{#} described above with the values for the <attribute-name> and <attribute-value> taken from the VML imagedata sub-element instead.

Example, to specify that a feature should be rendered with the sample ‘s.jpg’ image on top add the vml_imagedata_attr{#} list attribute with the following values to the feature:

vml_imagedata_attr{0} "src=c:\temp\s.jpg"

Range: <attribute-name>=<attribute-value>

Default: No Default