MapInfo Extended TAB Feature Representation
MapInfo features consist of geometry and attributes. The attribute names are defined on the feature type and there is a value for each attribute in each FME MapInfo feature.
In addition, each MapInfo FME feature contains several special attributes to hold the type of the geometric entity and its display parameters. All MapInfo FME features contain the mapinfo_type attribute, which identifies the geometric type. All MapInfo features may contain either or both of the fme_color and fme_fill_color attributes, which store the color and fill color of the feature, respectively.
In addition to the generic FME feature attributes that FME Workbench adds to all features (see About Feature Type Attributes), this format also adds format-specific attributes (Format Attributes).
Attribute Name |
Contents |
---|---|
mapinfo_type |
The MapInfo geometric type of this entity. Range:
|
mapinfo_metadata{}.name mapinfo_metadata{}.value |
These list attributes are used to write metadata to the .tab file. On write these name-value pairs will be written out as ‘“name” = “value”’ in the metadata section of the .tab file immediately following the table definition. On read these attributes will be populated from the same metadata section. These attributes accept strings up to 255 characters long. For metadata writing to function correctly, the number of name attributes should be the same as the number of value attributes. Note: Since metadata is a feature-type-level concept, the metadata written to the .tab file is determined entirely by the first feature to pass to the feature type. Metadata attributes on following features will be ignored by the writer. |
fme_color |
A normalized RGB triplet representing the color of the feature, with format r,g,b. Range: 0,0,0 to 1,1,1 Default: No default |
fme_fill_color |
A normalized RGB triplet representing the fill color of the feature, with format r,g,b. Range: 0,0,0 to 1,1,1 Default: No default |
Points
MapInfo point features specify a single x and y coordinate in addition to any associated user-defined attributes. An aggregate of point features may also be read or written – this corresponds to the MapInfo MULTI_POINT primitive type.
A MapInfo point also specifies a symbol. The symbol is defined by a symbol number, a color, and a size.1MapInfo symbols cannot be rotated. However, some third-party add-ons to MapInfo will rotate symbols based on a user-defined rotation attribute. If no symbol is defined for a point entity, the previous symbol is used. The table below lists the special FME attribute names used to control the MapInfo symbol settings.
Attribute Name |
Contents |
---|---|
mapinfo_symbol_color |
The color of the symbol. MapInfo colors are defined in relative concentrations of red, green, and blue. Each color ranges from 0 to 255, and the color value is calculated according to the formula: Range: 0…2^24 - 1 Default: 0 (black) |
mapinfo_symbol_shape |
The number of the symbol. See the MapInfo Reference Manual for a list of the available symbols. Range: 31...67 Default: 35 (a star) |
mapinfo_symbol_size |
The point size of the symbol. Note that this size is not scaled depending on the zoom level. Range: Any integer number > 0 Default: 10 |
Font Points
MapInfo font points are very similar to MapInfo points, but allow a symbol based on a TrueType font to be specified. In addition to the font, a rotation, color, shape number, size, and style may be specified.
The table below lists the special FME attribute names used to control the MapInfo font point settings:
Attribute Name |
Contents |
---|---|
mapinfo_symbol_color |
The color of the symbol calculated according to the formula: Range: 0…2^24 - 1 Default: 0 (black) |
mapinfo_symbol_shape |
The number of the shape within the TrueType font to use as the symbol. Range: Integer Default: No default |
mapinfo_symbol_size |
The point size of the symbol. Range: Integer Default: 12 |
mapinfo_symbol_font |
The name of the TrueType font to be used for the symbol. Range: String Default: No default |
mapinfo_symbol_angle |
The rotation angle for the symbol, measured in degrees counterclockwise from horizontal. Range: -360.0..360.0 Default: 0 |
mapinfo_symbol_style |
The display style for the symbol. Range: 0 (Plain text) 1 (Bold text) 16 (Black border around symbol) 32 (Drop Shadow) 256 (White border around symbol) Default: 0 |
Custom Points
MapInfo custom points are very similar to MapInfo points, but allow a bitmap image to be specified as the symbol to be drawn. In addition to the image, color, size, and style may be specified.
The table below lists the special FME attribute names used to control the MapInfo custom point settings:
Attribute Name |
Contents |
---|---|
mapinfo_symbol_color |
The color of the symbol calculated according to the formula: (red*65536) + (green*256) + blue Whether or not the color is used, depends on the setting of the style attribute. Range: 0…2^24 - 1 Default: 0 (black) |
mapinfo_symbol_file_name |
The name of the bitmap file found in the MapInfo CustSymb folder. Range: String Default: No default |
mapinfo_symbol_size |
The point size of the symbol. Range: Integer Default: 12 |
mapinfo_symbol_style |
The display style for the symbol. Range:
Default: 0 |
Multipoints
MapInfo multipoint is supported as a homogeneous aggregate feature composed of points, font points or custom points.
The MapInfo multipoint uses the same attribute names control settings as the points, font points and custom point.
Polylines
MapInfo polyline features specify linear features defined by a sequence of x and y coordinates. Each polyline has a pen style associated with it that specifies the color, width, and pen pattern of the line. A polyline may also specify that it is a smoothed line2MapInfo renders smoothed polylines substantially slower than unsmoothed polylines., in which case MapInfo uses a curve fitting algorithm when rendering the line. If no pen style is defined, the previous style is used.
Tip: MapInfo supports a special type for two point lines. FME transparently converts such lines into polylines, both as it reads and as it writes them.
The table below lists the special FME attribute names used to control the MapInfo polyline settings.
Attribute Name |
Contents |
---|---|
mapinfo_pen_color |
The color of the polyline. MapInfo colors are defined in relative concentrations of red, green, and blue. Each color ranges from 0 to 255, and the color value is calculated according to the formula: Range: 0…2^24 - 1 Default: 0 (black) |
mapinfo_pen_pattern |
The pattern used to draw the line. See the MapInfo Reference Manual for a list of the available patterns. Range: 1…77 Default: 2 |
mapinfo_pen_width |
The width of the line rendered for the polyline feature. This is measured as a thickness in pixels. A width of 1 is always drawn as a hairline. A width of 0 should be considered to be a line with no width, or a line with no style, or invisible, and should not normally be used. If an invisible line is necessary, it should be created by setting the pattern to 1 (None). If a hairline is desired, the pen should be created by setting the width to 1. The width can be specified as a point width, in which case this formula is used: penwidth = (point width * 10) + 10 Range: 0...7 (pixel width) 11...2047 (point width) Default: 1 |
mapinfo_smooth |
Controls whether or not the polyline will be smoothed when rendered. Range: true|false Default: false |
Regions
MapInfo region features specify area (polygonal) features. The areas that make up a single feature may or may not be disjoint, and may contain polygons which have holes. Each region has a pen style associated with it to control the color, width, and pen pattern used when its boundary is drawn. In addition, a region may set its brush pattern, foreground, and background color to control how the area it encloses will be filled.
The following table lists the special FME attribute names used to control the MapInfo region settings.
Attribute Name |
Contents |
---|---|
mapinfo_brush_pattern |
The pattern used to fill the area the region contains. See the MapInfo Reference Manual for a list of the available brush patterns. Range: 1…71 Default: 2 (solid) |
mapinfo_brush_foreground |
The foreground color used when the region is filled. MapInfo colors are defined in relative concentrations of red, green, and blue. Each color ranges from 0 to 255, and the color value is calculated according to the formula: (red*65536) + (green*256) + blue Range: 0…2^24 - 1 Default: 0 (black) |
mapinfo_brush_background |
The background color used when the region is filled. (-1 specifies transparent color) Range: -1…2^24 - 1 Default: 16777215 (white) |
mapinfo_brush_transparent |
Controls whether or not the brush’s background is transparent. Range:true|false Default:true if no brush background was specified or if set to -1; false otherwise |
mapinfo_pen_color |
The color of the boundary of the region. Range: 0…2^24 - 1 Default: 0 (black) |
mapinfo_pen_pattern |
The pattern used to draw the region’s boundary. See the MapInfo Reference Manual for a list of the available patterns. Range: 1…77 Default: 2 |
mapinfo_pen_width |
The width of the line rendered for the region’s boundary. This is measured as a thickness in pixels. A width of 1 is always drawn as a hairline. A width of 0 should be considered to be a line with no width, or a line with no style, or invisible, and should not normally be used. If an invisible line is necessary, it should be created by setting the pattern to 1 (None). If a hairline is desired, the pen should be created by setting the width to 1. Range: 0...35 Default: 1 |
mapinfo_centroid_x |
The centroid x coordinate. Range: Any real number Default: 0 Reprojectable: Yes |
mapinfo_centroid_y |
The centroid y coordinate. Range: Any real number Default: 0 Reprojectable: Yes |
Collections
MapInfo collections are defined as a combination of the other MapInfo geometry types. This is represented as nonhomogeneous aggregates composed of the other geometry types.
To create MapInfo collections using FME, set the mapinfo_type attribute to mapinfo_collection on the feature destined for the MapInfo dataset. It is important that the feature to be saved as a collection is an aggregate feature.
The table below lists the special FME attribute names used to control the MapInfo collection settings:
Attribute Name |
Contents |
---|---|
mapinfo_collection_ Deprecated |
This is the list attribute prefix used to store the attributes for each collection part. The suffixes are the attribute names for the control settings of the other geometric types. Range: none Default: none |