28
FME Readers and Writers 2013 SP1 MapInfo TAB Reader/Writer The MapInfo Native Format Reader and Writer modules provide FME with the ability to read and write directly to MapInfo files. The MapInfo Native Format is a proprietary for- mat used by the MapInfo Professional Desktop mapping product. MapInfo Native for- mat files are often called Tab files. The MapInfo Native Format reader and writer are closely patterned after the MapInfo MIF/MID reader and writer. This commonality makes it easy to support both MIF and MapInfo Native formats in the same mapping file. Overview MapInfo is a two-dimensional system with no provision for transferring elevation data for each vertex in a MapInfo feature. However, point features can define an elevation attribute to store their elevation. MapInfo files store both feature geometry and attributes. A logical MapInfo file con- sists of several physical files, having the following file name extensions: File Name Extension Contents .tab The main file for a MapInfo table, it is associated with the appropriate DAT, MAP, ID, and IND files. .dat, .dbf, .mdb, .accdb, .xls Tabular data for a table in MapInfo’s native format(.dat), dBASE format (.dbf), MS Access format (.mdb or .accdb) or MS Excel format (.xls). MS Access and MS Excel formats are only supported when using the MITAB reader. .id An index to a MapInfo graphical objects (MAP) file. .map Contains geographic information describing map objects. .ind An index to a MapInfo tabular (DAT) file. These extensions are added to the basename of the specified MapInfo file. Throughout the remainder of this chapter, references to “file” are references to the logical MapInfo file, not the multiple physical files that make it up. The MapInfo reader and writer support the storage of point, line, polyline, arc, ellipse, rectangle, rounded rectangle, region (polygon), and text geometric data. The MapInfo format also stores features with no geometry. Features having no geometry are referred to as having a geometry of none. Each geometric entity present in MapInfo has display properties, such as pen and brush width, pattern, and color. In addition, each entity has a row of attributes asso- ciated with it. A single MapInfo map file can contain many different types of geometry however, the associated attributes must have the same number and type of fields for each entity in the file. - 2236 -

FME Readers and Writers 2013 SP1 - Safe Softwaredocs.safe.com/fme/2013sp1/pdf/reader_writer_pdf/mapinfo.pdf · FormatTypeIdentifier MAPINFO MITAB Reader/Writer Both LicensingLevel

  • Upload
    lamdat

  • View
    213

  • Download
    0

Embed Size (px)

Citation preview

FME Readers and Writers 2013 SP1

MapInfo TAB Reader/Writer

The MapInfo Native Format Reader and Writer modules provide FME with the ability toread and write directly to MapInfo files. The MapInfo Native Format is a proprietary for-mat used by the MapInfo Professional Desktop mapping product. MapInfo Native for-mat files are often called Tab files.

The MapInfo Native Format reader and writer are closely patterned after the MapInfoMIF/MID reader and writer. This commonality makes it easy to support both MIF andMapInfo Native formats in the same mapping file.

Overview

MapInfo is a two-dimensional system with no provision for transferring elevation datafor each vertex in a MapInfo feature. However, point features can define an elevationattribute to store their elevation.

MapInfo files store both feature geometry and attributes. A logical MapInfo file con-sists of several physical files, having the following file name extensions:

File Name Extension Contents

.tab The main file for a MapInfo table, it is associated with theappropriate DAT, MAP, ID, and IND files.

.dat, .dbf, .mdb,

.accdb, .xlsTabular data for a table in MapInfo’s native format(.dat),dBASE format (.dbf), MS Access format (.mdb or .accdb) orMS Excel format (.xls). MS Access and MS Excel formats areonly supported when using the MITAB reader.

.id An index to a MapInfo graphical objects (MAP) file.

.map Contains geographic information describing map objects.

.ind An index to a MapInfo tabular (DAT) file.

These extensions are added to the basename of the specified MapInfo file. Throughoutthe remainder of this chapter, references to “file” are references to the logical MapInfofile, not the multiple physical files that make it up.

The MapInfo reader and writer support the storage of point, line, polyline, arc, ellipse,rectangle, rounded rectangle, region (polygon), and text geometric data. The MapInfoformat also stores features with no geometry. Features having no geometry arereferred to as having a geometry of none.

Each geometric entity present in MapInfo has display properties, such as pen andbrush width, pattern, and color. In addition, each entity has a row of attributes asso-ciated with it. A single MapInfo map file can contain many different types of geometryhowever, the associated attributes must have the same number and type of fields foreach entity in the file.

- 2236 -

MapInfo TAB Reader/Writer

The MapInfo reader can open datasets in which the attributes are stored as .dat, .dbf,.mdb, .accdb, or .xls files. In other words, the MapInfo reader supports datasets ofType NATIVE, Type DBF, Type ACCESS and Type XLS. Types ACCESS and XLS are onlysupported when using the MITAB reader

In addition, the MapInfo reader also supports datasets of Type FME. These are filesthat store all of their auxiliary information in a separate FME dataset. The auxiliarydataset can be in any format that the FME supports for reading. MapInfo files of typeFME are created in MapInfo 9.0 and later with the “Open Universal Data” option.

The number and type of attributes associated with each entity is specified by the user.There must be at least one attribute field defined before a MapInfo file can be created.

The following illustration shows a MapInfo file containing three region entities. Notethat the second polygon contains a hole while the third polygon is an aggregate of twodisjoint polygons, one of which contains a hole. Each geometric entity in turn cor-responds with one record in the attribute table.

FME considers a MapInfo dataset to be a collection of tab files and related files in a sin-gle directory. The attribute definitions for each MapInfo file set must be defined in themapping file before it can be read or written.

When translations are run with enhanced geometry handling turned ON, it enables theMapInfo reader to read complex geometries like heterogeneous aggregates, and ena-bles the FME to store them.

- 2237 -

FME Readers and Writers 2013 SP1

Note: Note, however, that when enhanced geometry handling is turned ON, the read-er’s BREAK_COLLECTION directive will be overwritten and set to NO.

MapInfo Quick Facts

About Quick Facts Tables

Format Type Identifier MAPINFOMITAB

Reader/Writer BothLicensing Level BaseDependencies NoneDataset Type Directory or FileFeature Type File base nameTypical File Extensions .tab (.dat, .id, .map, .ind)Automated Translation Support YesUser-Defined Attributes YesCoordinate System Support YesGeneric Color Support YesSpatial Index AlwaysSchema Required YesTransaction Support NoEnhanced Geometry Yes

Geometry Type mapinfo_type

Encoding Support Yes

Geometry Support

Geometry Supported? Geometry Supported?

aggregate yes point yes

circles yes polygon yes

circular arc yes raster no

donut polygon yes solid no

elliptical arc yes surface no

ellipses yes text yes

line yes z values no

none yes

- 2238 -

MapInfo TAB Reader/Writer

Reader Overview

The MapInfo reader first scans the directory it is given for the MapInfo files which havebeen defined in the mapping file. For each logical MapInfo file that it finds, it checks tosee if it that file is requested by looking at the list of IDs specified in the mapping file.If a match is made, or no IDs were specified in the mapping file, the MapInfo file isopened. The MapInfo reader then extracts features from the file one at a time, andpasses them on to the rest of the FME for further processing. When the file isexhausted, the MapInfo reader starts on the next file in the directory.

Optionally, a single MapInfo file can be given as the dataset. In this case, only thatMapInfo file is read.

Reader Directives

The directives that are processed by the MapInfo reader are listed below. The suffixshown is prefixed by the current <ReaderKeyword> in a mapping file. By default, the<ReaderKeyword> for the MIF reader is MAPINFO.

DATASET

Required/Optional: Required

The value for this keyword is the directory containing the MapInfo files to be read, or asingle MapInfo file. A typical mapping file fragment specifying an input MapInfo data-set looks like:

MAPINFO_DATASET /usr/data/mapinfo/92i080

Workbench Parameter:

Source MapInfo TAB File(s)

DEF

Required/Optional

Optional

The definition specifies the base name of the file, and the names and types of all attrib-utes. The syntax of a MapInfo DEF line is:

<ReaderKeyword>_DEF <baseName> [<attrName> <attrType>[,indexed]]+

The file names of the physical MapInfo files are constructed by using the directory spec-ified by the DATASET keyword, the basename specified on the MapInfo DEF lines, andthe file extensions.

MapInfo requires that at least one attribute be defined. The attribute definition givenmust match the definition of the file being read. If it does not, translation is halted andthe true definition of the MapInfo file attributes are logged to the log file. There are norestrictions on the field names of MapInfo attributes. The following table shows theattribute types which are supported.

- 2239 -

FME Readers and Writers 2013 SP1

Field Type Description

char(<width>) Character fields store fixed length strings. The widthparameter controls the maximum of characters storedby the field. No padding is required for strings shorterthan this width.

date Date fields store dates as character strings with the for-mat dependent on your location. This format is usuallyYYYYMMDD.

datetime Datetime fields store dates as character strings with theformat YYYYMMDDHHMMSS.FFF

decimal(<width>,<decimals>)

Decimal fields store single and double precision floatingpoint values. The width parameter is the total number ofcharacters allocated to the field, including the decimalpoint. The decimals parameter controls the precision ofthe data and is the number of digits to the right of thedecimal.

float Float fields store floating point values. There is no abilityto specify the precision and width of the field.

integer Integer fields store 32 bit signed integers.

logical Logical fields store boolean data. Data read or writtenfrom/to such fields must always have a value of eithertrue or false.

smallint Small integer fields store 16 bit signed integers, andtherefore have a range of -32767 to +32767.

time Time fields store times as character strings with the for-mat HHMMSS.FFF

The attribute type may also have ,indexed when the definition is specified for a writer.When specified, this results in the writer building an attribute index table for the col-umns that are indexed thereby making queries in MapInfo faster. This directive is onlyrecognized by the writer module.

The following mapping file fragment defines two MapInfo files. Notice that neither def-inition specifies the geometric type of the entities it will contain because MapInfo filesmay contain any of the valid geometry types.

MAPINFO_DEF landcover \area decimal(12,3) \landcoverType char(11) \perimeter float

MAPINFO_DEF roads \numberOfLanes smallint \

- 2240 -

MapInfo TAB Reader/Writer

roadType char(5) \underConstruction logical \divided logical \travelDirection char(6)

IDs

Required/Optional

Optional

This specification is used to limit the MapInfo files that are read. If no IDs are spec-ified, then all defined and available MapInfo files are read. The syntax of the IDs key-word is:

<ReaderKeyword>_IDs <baseName1> \<baseName2> \<baseNameN>

The basenames must match those used in DEF lines.

The example below selects only the roads MapInfo file for input during a translation:

MAPINFO_IDs roads

Workbench Parameter

Feature Types to Read

BREAK_COLLECTION (applicable only with classic geometry)

Required/Optional: Optional

This directive specifies how the MapInfo collections are processed. If no BREAK_COL-LECTION is specified, then all MapInfo collections are broken down into their com-ponent parts before being returned to FME. If a MapInfo-to-MapInfo translation isbeing performed, then this may be set to NO to preserve the collections as single fea-tures.

Note: Note that when enhanced geometry handling is turned ON, this directive willbe overwritten and set to NO.

This example shows how collections may be preserved:

MAPINFO_BREAK_COLLECTION NO

SEARCH_ENVELOPE

SEARCH_ENVELOPE

This directive specifies a bounding box used to filter the input features. Only featuresthat interact with the bounding box are returned. If this directive is not specified, thenall features are returned.This directive is only honoured by the MITAB-based MapInforeader in FME. This is the only MapInfo reader available on the UNIX platforms sup-ported by FME, and can optionally be enabled on Windows platforms by renaming themitab.dll in the FME home directory to mapinfo.dll.

- 2241 -

FME Readers and Writers 2013 SP1

Mapping File Syntax

<ReaderKeyword>_SEARCH_ENVELOPE <minX> <minY> <maxX> <maxY>

Note: If all four coordinates of the search envelope are specified as zero, the searchenvelope will be disabled.

Required/Optional

Optional

Workbench Parameter

Minimum X, Minimum Y, Maximum X, Maximum Y

FME_TABLE_PASSWORD

Required/Optional

Optional

This keyword is only applicable when opening datasets of Type FME. If the auxillaryFME dataset is a database reader, then MapInfo willl not automatically put the pass-word for the source database in the tab file. This directive allows the user to specifythe password dynamically. Additionally, if the password is hardcoded into the tab file,then this directive will supercede that password.

The syntax of the FME_TABLE_PASSWORD directive is:

    <ReaderKeyword>_FME_TABLE_PASSWORD password

This directive is optional. However, if it is needed to open the FME dataset, then it willneed to be provided on both generation and runtime.

Workbench Parameter

Password for FME Table

PRESERVE_TYPE

Required/Optional

Required

This keyword will cause the reader to not do any validation or fixing of MapInfo geome-try types. For example, lines consisting of only one point will have a geometry type ofmapinfo_polyline instead of being converted to mapinfo_point.

Note: This keyword is only honoured by the MITAB-based MapInfo reader in FME,setting this keyword on the MFAL-based MapInfo reader will have no effect on read-ing.

The syntax of the PRESERVE_TYPE directive is:

<ReaderKeyword>_PRESEVE_TYPE YES/NO

- 2242 -

MapInfo TAB Reader/Writer

Workbench Parameter

Advanced > Preserve Degenerate Geometry Types

ENCODING

This directive is applicable only if you are working with foreign (non-English) charactersets.

For example, if your source data contains foreign characters, using this directive alongwith the encoding value ensures that the original data is preserved from the reader tothe writer.

Required/Optional

Optional

Values

Values supported by MapInfo 10:

SJIS, CP437, CP850, CP852, CP855, CP857, CP860, CP861, CP863, CP864, CP865,CP869, CP932, CP936, CP950, CP1250, CP1251, CP1253, CP1254, CP1255, CP1256,ISO8859-1, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6, ISO8859-7,ISO8859-8, ISO8859-9

Mapping File Syntax

<ReaderKeyword>_ENCODING <encoding>

Workbench Parameter

Character Encoding (optional)

SEARCH_ENVELOPE

SEARCH_ENVELOPE

This directive specifies a bounding box used to filter the input features. Only featuresthat interact with the bounding box are returned. If this directive is not specified, thenall features are returned.This directive is only honoured by the MITAB-based MapInforeader in FME. This is the only MapInfo reader available on the UNIX platforms sup-ported by FME, and can optionally be enabled on Windows platforms by renaming themitab.dll in the FME home directory to mapinfo.dll.

Mapping File Syntax

<ReaderKeyword>_SEARCH_ENVELOPE <minX> <minY> <maxX> <maxY>

Note: If all four coordinates of the search envelope are specified as zero, the searchenvelope will be disabled.

Required/Optional

Optional

- 2243 -

FME Readers and Writers 2013 SP1

Workbench Parameter

Minimum X, Minimum Y, Maximum X, Maximum Y

SEARCH_ENVELOPE_COORDINATE_SYSTEM

This directive specifies the coordinate system of the search envelope if it is differentthan the coordinate system of the data.

The COORDINATE_SYSTEM directive, which specifies the coordinate system associatedwith the data to be read, must always be set if the SEARCH_ENVELOPE_COORDINATE_SYS-TEM directive is set.

If this directive is set, the minimum and maximum points of the search envelope arereprojected from the SEARCH_ENVELOPE_COORDINATE_SYSTEM to the reader COOR-DINATE_SYSTEM prior to applying the envelope.

Required/Optional

Optional

Mapping File Syntax

<ReaderKeyword>_SEARCH_ENVELOPE_COORDINATE_SYSTEM <coordinate sys-tem>

Workbench Parameter

Search Envelope Coordinate System

CLIP_TO_ENVELOPE

This directive specifies whether or not FME should clip features to the envelope spec-ified in the SEARCH_ENVELOPE directive.

Values

YES | NO (default)

Mapping File Syntax

<ReaderKeyword>_CLIP_TO_ENVELOPE [yes | no]

Workbench Parameter

Clip To Envelope

EXPOSED_ATTRS

This directive allows the selection of format attributes to be explicitly added to thereader feature type.

This is similar to exposing format attributes on a reader feature type once it has beengenerated; however, it is even more powerful because it enables schema-driven appli-

- 2244 -

MapInfo TAB Reader/Writer

cations other than Workbench to access and leverage these attributes as if they wereexplicitly on the schema as user attributes.

The result of picking a list of attributes is a comma-separated list of attribute namesand types that will be added to the schema features. Currently all reader feature typeswill receive the same set of additional schema attributes for a given instance of thereader.

Required/Optional

Optional

Mapping File Syntax

Not applicable. While it is possible for FME Objects applications to invoke this direc-tive, the required format is not documented. This directive is intended for use in ourGUI applications (for example, Workbench) only.

Workbench Parameter

Additional Attributes to Expose

Writer Overview

The MapInfo writer creates and writes feature data to MapInfo files in the directoryspecified by the DATASET keyword. If the directory does not exist, the writer has tocreate it. Any old MapInfo files in the directory are overwritten with the new featuredata. As features are routed to the MapInfo writer, the MapInfo writer determines thefile into which the features are to be written and outputs them accordingly. ManyMapInfo files can be written during a single FME session.

The version of TAB files produced depends on the data being written. FME auto-matically writes the lowest possible version that still supports the data. For example, iftime or datetime attributes are being written, or the coordinate system is “Krovak S-JTSK”, then the version will be set to at least 900; otherwise it will be lower if the datacan be supported in a lower version.

When the MapInfo writer receives a feature with an fme_color or fme_fill_color

attribute, the writer will honor the color values. The only exception is when nativeMapInfo color settings are also present, in which case the native settings will take prec-edence.

The MapInfo writer will not create DAT files larger than 2GB.

Writer Directives

The directives that are processed by the MAPINFO writer are listed below. The suffixesshown are prefixed by the current <WriterKeyword> in a mapping file. By default, the<WriterKeyword> for the MapInfo writer is MAPINFO.

The MapInfo writer processes the DATASET and DEF keywords as described in theReader Directives section. It does, however, make use of some additional directives:

- 2245 -

FME Readers and Writers 2013 SP1

DATASET

Required/Optional: Required

Contains the directory name of the output MapInfo files.

Workbench Parameter: Destination Directory

DEF

Required/Optional: Required

Defines a MapInfo file. The definition contains the file’s base name (without any of theextensions), and the definitions of the attributes. There may be many DEF lines, onefor each file to be written.

COORDSYS_STATEMENT

Required/Optional: Optional

The value for this directive is the coordinate system statement that should be used inthe produced MapInfo files. Normally, FME examines the coordinate system infor-mation present on the features written to the files, and outputs the coordinate systembased on this information. However, in certain circumstances it is necessary to over-ride this and force a particular coordinate system to be output. This is typically done toforce the units of a non-earth projection to something other than the default, which ismetres.

The syntax of this line is the same as that defined for the CoordSys line in the MapInfoMIF/MID documentation. For example, to force a non-earth inches coordinate system,this line would be present in the mapping file:

MAPINFO_COORDSYS_STATEMENT CoordSys NonEarth Units \"in\"

Notice that the quotes must be escaped, as they are required when the coordinate sys-tem statement is interpreted by the MapInfo Writer.

Workbench Parameter: Coordinate System Statement

BOUNDS

Required/Optional: Optional

This directive allows explicit setting of the bounds of the output features. BecauseMapInfo has limited precision available for the storage of coordinates, defining a tightbound on the range of the data can preserve more accuracy. The syntax of this direc-tive is:

MAPINFO_BOUNDS<xmin> <ymin> <xmax> <ymax>

Workbench Parameter: Bounds Min X, Bounds Min Y, Bounds Max X, Bounds Max Y

BUILD_OPTIMAL_SPATIAL_INDEX

Required/Optional: Optional

- 2246 -

MapInfo TAB Reader/Writer

This directive tells the MapInfo writer to create an optimal spatial index when writing.This will allow for faster spatial queries on the resulting file when using MapInfo Pro orother software that takes advantage of built in spatial indexing. The use of this direc-tive will, however, slow down the writing of the file. The default value for the directiveis no. The syntax of this directive is:

MAPINFO_BUILD_OPTIMAL_SPATIAL_INDEX <yes|no>

Workbench Parameter: Build Optimal Spatial Index

Note: This writer directive pertains only to the MITAB writer.

USE_SOURCE_BOUNDING_BOX

The USE_SOURCE_BOUNDING_BOX directive tells the MapInfo writer to attempt to useany bounding box information that the Reader for the current FME session can provideit to set its bounds. This will only be used when no coordinate system is set for theMapInfo writer.

Currently, only the Shape reader in FME provides bounding box information, so settingthis directive to YES will only have an effect if a Shape to MapInfo translation is beingperformed without any coordinate system being set.

Note: This is a writer directive and applies only to the MapInfo writer. Its use is dis-couraged.

FILENAME_PREFIX

Required/Optional: Optional

The value for this keyword is prepended to every output file that is created by thewriter.

For example, to have the word temp appear on the front of every file name, this linewould be present in the mapping file:

MAPINFO_FILENAME_PREFIX temp

WRITE_REGION_CENTROIDS

Required/Optional: Optional

To direct the Writer to output calculate the region centroid and store the x and y valuesin the corresponding mapinfo_centroid_x and mapinfo_centroid_y format attributes.The Writer will only attempt to calculate the centroid values if the format attributeswere not previously set. If neither the format attributes or this directive are set adefault centroid value will still be calculated by underlying libraries. The syntax of thisdirective is:

WRITE_REGION_CENTROIDS yes

Workbench Parameter: Generate and Write Region Centroids

STROKE_ARCS

Required/Optional: Optional

- 2247 -

FME Readers and Writers 2013 SP1

Indicates whether the arcs will be vectorized before writing. If yes, all arcs will be con-verted to polylines. This option may be useful where sweep angles have precision finerthan 0.1 degree.

STROKE_ARCS yes

Workbench Parameter: Stroke arcs into polyline

ENCODING

This directive is applicable only if you are working with foreign (non-English) charactersets.

For example, if your data contains foreign characters, using this directive along withthe encoding value ensures that the original characters are preserved.

Required/Optional

Optional

Values

Values supported by MapInfo 10:

SJIS, CP437, CP850, CP852, CP855, CP857, CP860, CP861, CP863, CP864, CP865,CP869, CP932, CP936, CP950, CP1250, CP1251, CP1253, CP1254, CP1255, CP1256,ISO8859-1, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6, ISO8859-7,ISO8859-8, ISO8859-9

Mapping File Syntax

<WriterKeyword>_ENCODING <encoding>

Workbench Parameter

Character Encoding (optional)

Feature Representation

MapInfo features consist of geometry and attributes. The attribute names are definedin 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 thetype of the geometric entity and its display parameters. All MapInfo FME features con-tain the mapinfo_type attribute, which identifies the geometric type. All MapInfo fea-tures 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 fea-tures (see About Feature Attributes), this format adds the format-specific attributesdescribed in this section.

- 2248 -

MapInfo TAB Reader/Writer

Attribute Name Contents

mapinfo_type The MapInfo geometric type of this entity.Range:

mapinfo_point |

mapinfo_polyline|

mapinfo_region|

mapinfo_text|

mapinfo_ellipse|

mapinfo_arc|

mapinfo_rectangle|

mapinfo_rounded_rectangle|

mapinfo_collection|

mapinfo_none

Default: No default

mapinfo_metadata{}.name

mapinfo_metadata{}.value

These list attributes are used to write metadata to the .tabfile. On write these name-value pairs will be written out as‘“name” = “value”’ in the metadata section of the .tab fileimmediately following the table definition. On read theseattributes will be populated from the same metadata sec-tion. These attributes accept strings up to 255 characterslong.

Note: For metadata writing to function correctly, thenumber of name attributes should be the same as thenumber of value attributes.

Note: These attributes will only appear when using theMITAB reader or writer.

Note: Since metadata is a feature type level concept themetadata written to the .tab file is determined entirely bythe first feature to pass to the feature type, metadataattributes on following features will be ignored by thewriter.

fme_color A normalized RGB triplet representing the color of the fea-ture, with format r,g,b.Range: 0,0,0 to 1,1,1Default: No default

fme_fill_color A normalized RGB triplet representing the fill color of the

- 2249 -

FME Readers and Writers 2013 SP1

Attribute Name Contents

feature, with format r,g,b.Range: 0,0,0 to 1,1,1Default: No default

Points

mapinfo_type:mapinfo_point

MapInfo point features specify a single x and y coordinate in addition to any associateduser-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, acolor, and a size.1 If no symbol is defined for a point entity, the previous symbol isused. The table below lists the special FME attribute names used to control the MapInfosymbol settings.

Attribute Name Contents

mapinfo_symbol_color The color of the symbol. MapInfo colors are defined inrelative concentrations of red, green, and blue. Eachcolor ranges from 0 to 255, and the color value is cal-culated according to the formula:(red*65536) + (green*256) + blueRange: 0…2^24 - 1Default: 0 (black)

mapinfo_symbol_shape The number of the symbol. See the MapInfo ReferenceManual for a list of the available symbols.Range: 31...67Default: 35 (a star)

mapinfo_symbol_size The point size of the symbol. Note that this size is notscaled depending on the zoom level.Range: Any integer number > 0Default: 10

Font Points

mapinfo_type:mapinfo_font_point

MapInfo font points are very similar to MapInfo points, but allow a symbol based on aTrueType font to be specified. In addition to the font, a rotation, color, shape number,size, and style may be specified.

1MapInfo symbols cannot be rotated. However, some third-party add-ons to MapInfowill rotate symbols based on a user-defined rotation attribute.

- 2250 -

MapInfo TAB Reader/Writer

The table below lists the special FME attribute names used to control the MapInfo fontpoint settings:

Attribute Name Contents

mapinfo_symbol_color The color of the symbol calculated according to theformula:(red*65536) + (green*256) + blueRange: 0…2^24 - 1Default: 0 (black)

mapinfo_symbol_shape The number of the shape within the TrueType font touse as the symbol.Range: IntegerDefault: No default

mapinfo_symbol_size The point size of the symbol.Range: IntegerDefault: 12

mapinfo_symbol_font The name of the TrueType font to be used for thesymbol.Range: StringDefault: No default

mapinfo_symbol_angle The rotation angle for the symbol, measured indegrees counterclockwise from horizontal.Range: -360.0..360.0Default: 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_type:mapinfo_custom_point

MapInfo custom points are very similar to MapInfo points, but allow a bitmap image tobe specified as the symbol to be drawn. In addition to the image, color, size, and stylemay be specified.

- 2251 -

FME Readers and Writers 2013 SP1

The table below lists the special FME attribute names used to control the MapInfo cus-tom point settings:

Attribute Name Contents

mapinfo_symbol_color The color of the symbol calculated according to theformula:(red*65536) + (green*256) + blueWhether or not the color is used, depends on the set-ting of the style attribute.Range: 0…2^24 - 1Default: 0 (black)

mapinfo_symbol_file_name The name of the bitmap file found in the MapInfoCustSymb directory.Range: StringDefault: No default

mapinfo_symbol_size The point size of the symbol.Range: IntegerDefault: 12

mapinfo_symbol_style The display style for the symbol.Range:

0 (White pixels in the image are transparent,allowing whatever is beneath to show through.Non-white pixels are drawn in the same color asthey are in the bitmap.)

1 (White pixels in the image are drawn as white.Non-white pixels are drawn in the same color asthey are in the bitmap.)

2 (White pixels in the image are transparent.Non-white pixels are drawn in the color spec-ified by mapinfo_symbol_color.)

3 (White pixels in the image are drawn in white.Non-white pixels are drawn in the color spec-ified by mapinfo_symbol_color)

Default: 0

Multipoints

mapinfo_type:mapinfo_point, mapinfo_font_point, mapinfo_custom_point

MapInfo multipoint is supported as a homogeneous aggregate feature composed ofpoints, font points or custom points.

- 2252 -

MapInfo TAB Reader/Writer

The MapInfo multipoint uses the same attribute names control settings as the points,font points and custom point.

Polylines

mapinfo_type:mapinfo_polyline

MapInfo polyline features specify linear features defined by a sequence of x and y coor-dinates. 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 line1, inwhich case MapInfo uses a curve fitting algorithm when rendering the line. If no penstyle is defined, the previous style is used.

Tip: MapInfo supports a special type for two point lines. FME transparently convertssuch 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 poly-line settings.

Attribute Name Contents

mapinfo_pen_color The color of the polyline. MapInfo colors are defined inrelative concentrations of red, green, and blue. Eachcolor ranges from 0 to 255, and the color value is cal-culated according to the formula:(red*65536) + (green*256) + blueRange: 0…2^24 - 1Default: 0 (black)

mapinfo_pen_pattern The pattern used to draw the line. See the MapInfo Ref-erence Manual for a list of the available patterns.Range: 1…77Default: 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 isalways drawn as a hairline. A width of 0 should be con-sidered to be a line with no width, or a line with no style,or invisible, and should not normally be used. If an invis-ible line is necessary, it should be created by setting thepattern to 1 (None). If a hairline is desired, the penshould be created by setting the width to 1.The width can be specified as a point width, in whichcase this formula is used: penwidth = (point width * 10) + 10Range:0...7 (pixel width)

1MapInfo renders smoothed polylines substantially slower than unsmoothed polylines.

- 2253 -

FME Readers and Writers 2013 SP1

Attribute Name Contents

11...2047 (point width)Default: 1

mapinfo_smooth Controls whether or not the polyline will be smoothedwhen rendered.Range: true|falseDefault: false

Regions

mapinfo_type:mapinfo_region

MapInfo region features specify area (polygonal) features. The areas that make up asingle 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 pat-tern 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 MapInforegion 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 theavailable brush patterns.Range: 1…71Default: 2 (solid)

mapinfo_brush_foreground The foreground color used when the region is filled.MapInfo colors are defined in relative concentrationsof red, green, and blue. Each color ranges from 0 to255, and the color value is calculated according to theformula:(red*65536) + (green*256) + blueRange: 0…2^24 - 1Default: 0 (black)

mapinfo_brush_background The background color used when the region is filled.(-1 specifies transparent color)Range: -1…2^24 - 1Default: 16777215 (white)

mapinfo_brush_transparent Controls whether or not the brush’s background istransparent.Range: true|false

- 2254 -

MapInfo TAB Reader/Writer

Attribute Name Contents

Default: true if no brush background was specified orif set to -1; false otherwise

mapinfo_pen_color The color of the boundary of the region.Range: 0…2^24 - 1Default: 0 (black)

mapinfo_pen_pattern The pattern used to draw the region’s boundary. Seethe MapInfo Reference Manual for a list of the avail-able patterns.Range: 1…77Default: 2

mapinfo_pen_width The width of the line rendered for the region’s bound-ary. This is measured as a thickness in pixels. Awidth of 1 is always drawn as a hairline. A width of 0should be considered to be a line with no width, or aline with no style, or invisible, and should not nor-mally be used. If an invisible line is necessary, itshould be created by setting the pattern to 1 (None).If a hairline is desired, the pen should be created bysetting the width to 1.Range: 0...35Default: 1

mapinfo_centroid_x The centroid x coordinate.Range: Any real numberDefault: 0

mapinfo_centroid_y The centroid y coordinate.Range: Any real numberDefault: 0

Text

mapinfo_type:mapinfo_text

MapInfo text features are used to specify annotation information. Each text feature canhave its font, color, spacing, justification, and rotation angle set independently. The fol-lowing table lists the special FME attribute names used to control the MapInfo text set-tings.

Attribute Name Contents

mapinfo_rotation The rotation of the text, as measured indegrees counterclockwise from hor-izontal.

- 2255 -

FME Readers and Writers 2013 SP1

Attribute Name Contents

Range: -360.0..360.0Default: 0

mapinfo_text_fontbgcolor The background color used when the textis drawn.Range: 0…2^24 - 1Default: 16777215 (white)

mapinfo_text_fontfgcolor The foreground color used when the textis drawn. MapInfo colors are defined inrelative concentrations of red, green, andblue. Each color ranges from 0 to 255,and the color value is calculated accord-ing to the formula:(red*65536) + (green*256) + blueRange: 0…2^24 - 1Default: 0 (black)

mapinfo_text_fontname The name of the font used to draw thetext. The font named must be availableon the destination computer system.Range: Any valid system fontDefault: Helve

mapinfo_text_height The height of the text in ground units.Range: Any real number >= 0Default: 10

mapinfo_text_justification The justification of the text.Range: left | center | rightDefault: left

mapinfo_text_spacing The spacing between lines of multilinetext. The measure is expressed as a mul-tiple of the text height.Range: 1.0 | 1.5 | 2.0Default: 1.0

mapinfo_text_linetype The type of line attaching the text to theanchor point.

Range:

0 (None: do not display a line withthe label.)

- 2256 -

MapInfo TAB Reader/Writer

Attribute Name Contents

1 (Simple: create a callout by usinga simple line that connects the labelto the anchor point.)

2 (Arrow: create a callout by usingan arrow and line that connects thelabel to anchor point.)

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 thelabel line to be visible.Range: Any real numberDefault: No default

mapinfo_text_line_end_y The y position of the label line end point.The linetype needs to be 1 or 2 for thelabel line to be visible.Range: Any real numberDefault: No default

mapinfo_text_line_pen_color Stores pen color for text labelRange: 0…2^24 - 1Default: 0 (black)

mapinfo_text_line_pen_width Stores pen width for text labelRange:0...7 (pixel width)11...2047 (point width)Default: 1

mapinfo_text_line_pen_pattern Stores pen pattern for text labelRange: 1…77Default: 2

mapinfo_text_fontstyle_bold Indicates if the text is bold or not.Range: true | falseDefault: false

mapinfo_text_fontstyle_italic Indicates if the text is in ItalicsRange: true | falseDefault: false

mapinfo_text_fontstyle_underline Indicates if the text is underlined.

- 2257 -

FME Readers and Writers 2013 SP1

Attribute Name Contents

Range: true | falseDefault: false

mapinfo_text_fontstyle_strikeout Indicates if the text has a line throughthe middle of it.Range: true | falseDefault: false

mapinfo_text_fontstyle_outline Indicates if the text is outlinedRange: true | falseDefault: false

mapinfo_text_fontstyle_shadow Indicates if the text has a shadow.Range: true | falseDefault: false

mapinfo_text_fontstyle_inverse Indicates if the text is shown in inverse.Range: true | falseDefault: false

mapinfo_text_fontstyle_blink Indicates if the text is blinking.Range: true | falseDefault: false

mapinfo_text_fontstyle_opaque Indicates if the text is opaque.Range: true | falseDefault: false

mapinfo_text_fontstyle_halo Indicates if the text has a halo.Range: true | falseDefault: false

mapinfo_text_fontstyle_allcaps Indicates if the text is uppercase.Range: true | falseDefault: false

mapinfo_text_fontstyle_expanded Indicates if the text is expanded.Range: true | falseDefault: false

mapinfo_text_string The text to be displayed.Range: Any character stringDefault: No default

mapinfo_text_width The width of the entire text string, in

- 2258 -

MapInfo TAB Reader/Writer

Attribute Name Contents

ground units.Range: Any real number >= 0Default: 10

Ellipse

mif_type:mif_ellipse

MapInfo ellipse features are point features, and only have a single coordinate. Thispoint serves as the centre of the ellipse. Additional attributes specify the primary axisand the secondary axis of the ellipse. MapInfo ellipses currently do not support rota-tion. For compatibility with other systems, the MapInfo reader always returns a rota-tion 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: The primary ellipse axis is not necessarily the longest axis, but rather the one onthe x axis.

In addition to the attributes below, ellipses also make use of the brush and pen attrib-utes 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 > 0Default: No default

mapinfo_secondary_axis The length of the semi-minor axis in ground units.Range: Any real number > 0Default: No default

mapinfo_rotation The rotation of the major axis. The rotation is meas-

- 2259 -

FME Readers and Writers 2013 SP1

Attribute Name Contents

ured in degrees counterclockwise up from horizontal.Range: -360.0..360.0Default: 0

Arc

mapinfo_type:mapinfo_arc

MapInfo arc features are linear features used to specify elliptical arcs. As such, the fea-ture definition for mapinfo_arc is similar to the ellipse definition with two additionalangles to control the portion of the ellipse boundary drawn. MapInfo arcs currently donot support rotation. For compatibility with other systems, the MapInfo reader alwaysreturns a rotation of 0. In addition, if a rotation is specified to the writer, the arc isturned into a polyline, vectorized, and rotated by the amount specified.

Tip: The function@Arc() can be used to convert an arc to a linestring. This is useful forstoring Arcs in systems not supporting them directly.

In addition the attributes below, arcs also make use of the pen attributes as defined onmapinfo_polyline.

Attribute Name Contents

mapinfo_primary_axis The length of the semi-major axis in ground units.Range: Any real number > 0Default: No default

mapinfo_secondary_axis The length of the semi-minor axis in ground units.Range: Any real number > 0Default: No default

mapinfo_start_angle Refer to the @Arc (function) in the FME Functions and Factoriesmanual for a detailed definition of start_angle.

Range: 0.0..360.0Default: 0

mapinfo_sweep_angle Refer to the @Arc (function) in the FME Functions and Factoriesmanual for a detailed definition of sweep_angle.

Range: 0.0..360.0Default: No default

mapinfo_rotation The rotation of the major axis. The rotation is measuredin degrees counter clockwise up from horizontal.Range: -360.0..360.0Default: 0

- 2260 -

MapInfo TAB Reader/Writer

Rectangle

mapinfo_type:mapinfo_rectangle

MapInfo rectangle objects are represented in the FME as closed polygons. When aMapInfo rectangle is read, it is turned into a closed polygon feature. When a MapInforectangle is written, the minimum bounding rectangle of the feature is taken and usedas the four corners of the rectangle. MapInfo rectangles take the same additional attrib-utes as MapInfo regions to specify their brush and pen.

Rounded Rectangle

mapinfo_type:mapinfo_rounded_rectangle

MapInfo rounded rectangle objects are represented in the FME as closed polygons.When a MapInfo rounded rectangle is read, it is turned into a closed polygon featureand the corners are vectorized to preserve the intended shape of the rectangle. Therounding radius is also stored as an attribute. When a MapInfo rounded rectangle iswritten, the minimum bounding rectangle of the feature is taken and used as the fourcorners of the rectangle, and the rounding diameter is taken from an attribute of thefeature. MapInfo rounded rectangles take the same additional attributes as MapInforegions to specify their brush and pen.

Attribute Name Contents

mapinfo_rounding_width Contains the width, in ground units, of the ellipseused to produce the rounded corners.Range: Any real number > 0Default: No default

mapinfo_rounding_height Contains the height, in ground units, of the ellipseused to produce the rounded corners.Range: Any real number > 0Default: Value of mapinfo_rounding_width

Collections

mapinfo_type: mapinfo_collection

MapInfo collections are defined as a combination of the other MapInfo geometry types.This is represented as nonhomogeneous aggregates composed of the other geometrytypes.

- 2261 -

FME Readers and Writers 2013 SP1

To create MapInfo collections using FME, set the mapinfo_type attribute to mapinfo_col-lection on the feature destined for the MapInfo dataset. It is important that the featureto be saved as a collection is an aggregate feature.

The table below lists the special FME attribute names used to control the MapInfo col-lection settings:

Attribute Name Contents

mapinfo_collection_cmp{}

Deprecated

This is the list attribute prefix used to store the attributesfor each collection part. The suffixes are the attributenames for the control settings of the other geometrictypes.Range: noneDefault: none

- 2262 -