Feature Representation
MapInfo features consist of geometry and attributes. The attribute names are defined in the DEF
line 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 Attributes), this format adds the format-specific attributes described in this section.
Attribute Name |
Contents |
mapinfo_type |
The MapInfo geometric type of this entity. Range:
Default: No default |
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. Note: For metadata writing to function correctly, the number of name attributes should be the same as the number of value attributes. Note: These attributes will only appear when using the MITAB reader or writer. 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: 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 |
Text
MapInfo text features are used to specify annotation information. Each text feature can have its font, color, spacing, justification, and rotation angle set independently. The following table lists the special FME attribute names used to control the MapInfo text settings.
Attribute Name |
Contents |
mapinfo_rotation |
The rotation of the text, as measured in degrees counterclockwise from horizontal. Range: -360.0..360.0 Default: 0 Reprojectable: Yes |
mapinfo_text_fontbgcolor |
The background color used when the text is drawn. Range: 0…2^24 - 1 Default: 16777215 (white) |
mapinfo_text_fontfgcolor |
The foreground color used when the text is drawn. 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_text_fontname |
The name of the font used to draw the text. The font named must be available on the destination computer system. Range: Any valid system font Default: Helve |
mapinfo_text_height |
The height of the text in ground units. Range: Any real number >= 0 Default: 10 Reprojectable: Yes |
mapinfo_text_justification |
The justification of the text. Range: left | center | right Default: left |
mapinfo_text_spacing |
The spacing between lines of multiline text. The measure is expressed as a multiple of the text height. Range: 1.0 | 1.5 | 2.0 Default: 1.0 |
mapinfo_text_linetype |
The type of line attaching the text to the anchor point. Range:
Default: 0 (None) |
mapinfo_text_line_end_x |
The x position of the label line end point. The linetype needs to be 1 or 2 for the label line to be visible. Range: Any real number Default: No default Reprojectable: Yes |
mapinfo_text_line_end_y |
The y position of the label line end point. The linetype needs to be 1 or 2 for the label line to be visible. Range: Any real number Default: No default Reprojectable: Yes |
mapinfo_text_line_pen_color |
Stores pen color for text label Range: 0…2^24 - 1 Default: 0 (black) |
mapinfo_text_line_pen_width |
Stores pen width for text label Range: 0...7 (pixel width) 11...2047 (point width) Default: 1 |
mapinfo_text_line_pen_pattern |
Stores pen pattern for text label Range: 1…77 Default: 2 |
mapinfo_text_fontstyle_bold |
Indicates if the text is bold or not. Range: true | false Default: false |
mapinfo_text_fontstyle_italic |
Indicates if the text is in Italics Range: true | false Default: false |
mapinfo_text_fontstyle_underline |
Indicates if the text is underlined. Range: true | false Default: false |
mapinfo_text_fontstyle_strikeout |
Indicates if the text has a line through the middle of it. Range: true | false Default: false |
mapinfo_text_fontstyle_outline |
Indicates if the text is outlined Range: true | false Default: false |
mapinfo_text_fontstyle_shadow |
Indicates if the text has a shadow. Range: true | false Default: false |
mapinfo_text_fontstyle_inverse |
Indicates if the text is shown in inverse. Range: true | false Default: false |
mapinfo_text_fontstyle_blink |
Indicates if the text is blinking. Range: true | false Default: false |
mapinfo_text_fontstyle_opaque |
Indicates if the text is opaque. Range: true | false Default: false |
mapinfo_text_fontstyle_halo |
Indicates if the text has a halo. Range: true | false Default: false |
mapinfo_text_fontstyle_allcaps |
Indicates if the text is uppercase. Range: true | false Default: false |
mapinfo_text_fontstyle_expanded |
Indicates if the text is expanded. Range: true | false Default: false |
mapinfo_text_string |
The text to be displayed. Range: Any character string Default: No default |
mapinfo_text_width |
The width of the entire text string, in ground units. Range: Any real number >= 0 Default: 10 Reprojectable: Yes |
Ellipse
MapInfo ellipse features are point features, and only have a single coordinate. This point serves as the center of the ellipse. Additional attributes specify the primary axis and the secondary axis of the ellipse. MapInfo ellipses currently do not support rotation.
For compatibility with other systems, the MapInfo reader always returns a rotation of 0. If a rotation is specified to the writer, the ellipse is turned into a region, vectorized, and rotated by the amount specified.
Tip: Tip: The primary ellipse axis is not necessarily the longest axis, but rather the one on the x axis.
In addition to the attributes below, ellipses also make use of the brush and pen attributes as defined by mapinfo_region.
Attribute Name |
Contents |
mapinfo_primary_axis |
The length of the semi-major axis in ground units. Range: Any real number > 0 Default: No default Reprojectable: Yes |
mapinfo_secondary_axis |
The length of the semi-minor axis in ground units. Range: Any real number > 0 Default: No default Reprojectable: Yes |
mapinfo_rotation |
The rotation of the major axis. The rotation is measured in degrees counterclockwise up from horizontal. Range: -360.0..360.0 Default: 0 Reprojectable: Yes |
Arc
MapInfo arc features are linear features used to specify elliptical arcs. As such, the feature definition for mapinfo_arc
is similar to the ellipse definition with two additional angles to control the portion of the ellipse boundary drawn. MapInfo arcs currently do not support rotation. For compatibility with other systems, the MapInfo reader always returns a rotation of 0. In addition, if a rotation is specified to the writer, the arc is turned into a polyline, vectorized, and rotated by the amount specified.
Tip: The ArcStroker transformer can be used to convert an arc to a linestring. This is useful for storing Arcs in systems that do not support them directly.
In addition the attributes below, arcs also make use of the pen attributes as defined on mapinfo_polyline
.
Attribute Name |
Contents |
mapinfo_primary_axis |
The length of the semi-major axis in ground units. Range: Any real number > 0 Default: No default Reprojectable: Yes |
mapinfo_secondary_axis |
The length of the semi-minor axis in ground units. Range: Any real number > 0 Default: No default Reprojectable: Yes |
mapinfo_start_angle |
How FME calculates start_angle and sweep_angle Range: 0.0..360.0 Default: 0 Reprojectable: Yes |
mapinfo_sweep_angle |
How FME calculates start_angle and sweep_angle Range: 0.0..360.0 Default: No default Reprojectable: Yes |
mapinfo_rotation |
The rotation of the major axis. The rotation is measured in degrees counter clockwise up from horizontal. Range: -360.0..360.0 Default: 0 Reprojectable: Yes |
Rectangle
MapInfo rectangle objects are represented in FME as closed polygons.
When a MapInfo rectangle is read, it is turned into a closed polygon feature. When a MapInfo rectangle is written, the minimum bounding rectangle of the feature is taken and used as the four corners of the rectangle.
MapInfo rectangles take the same additional attributes as MapInfo regions to specify their brush and pen.
Rounded Rectangle
MapInfo rounded rectangle objects are represented in FME as closed polygons.
When a MapInfo rounded rectangle is read, it is turned into a closed polygon feature and the corners are vectorized to preserve the intended shape of the rectangle. The rounding radius is also stored as an attribute. When a MapInfo rounded rectangle is written, the minimum bounding rectangle of the feature is taken and used as the four corners of the rectangle, and the rounding diameter is taken from an attribute of the feature. MapInfo rounded rectangles take the same additional attributes as MapInfo regions to specify their brush and pen.
Attribute Name |
Contents |
mapinfo_rounding_width |
Contains the width, in ground units, of the ellipse used to produce the rounded corners. Range: Any real number > 0 Default: No default |
mapinfo_rounding_height |
Contains the height, in ground units, of the ellipse used to produce the rounded corners. Range: Any real number > 0 Default: Value of mapinfo_rounding_width |
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 |