MapInfo TAB (MAPINFO/MITAB) Reader/Writer
MapInfo Formats: FME can read and write several of the proprietary formats created by MapInfo Pro. For help with choosing the format that is right for your workflow, see Choosing the Right MapInfo Format.
FME reads and writes MapInfo files.
The MapInfo Native Format is a proprietary format used by the MapInfo Pro mapping product. MapInfo Native format files are often called TAB files.
This module is 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 workspace.
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 consists of several physical files, having the following filename extensions:
Filename 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 |
Tabular data for a table in MapInfo’s native format (.dat), dBASE format (.dbf), or Microsoft Access format (.mdb or .accdb). Microsoft Access format is 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.
Note: In this chapter, references to file are references to the logical MapInfo file, not the multiple physical files that make it up.
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 associated 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.
The MapInfo reader can open datasets in which the attributes are stored as .dat, .dbf, .mdb, or .accdb files. In other words, the MapInfo reader supports datasets of Type NATIVE, Type DBF, Type ACCESS and Type XLS. Type ACCESS is only supported when using the MITAB reader.
Note: FME does not directly support MapInfo Grid (.tab .grd) files; however, you can use the MapInfo Vertical Mapper Grid (NGrid) Reader/Writer to read these files.
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. Note that the second polygon contains a hole while the third polygon is an aggregate of two disjoint polygons, one of which contains a hole. Each geometric entity in turn corresponds with one record in the attribute table.
FME considers a MapInfo dataset to be a collection of TAB files and related files in a single folder. The attribute definitions for each MapInfo file set must be defined in the workspace before data can be read or written.
Reader Overview
The MapInfo reader first scans the folder it is given for the MapInfo files specified in the Reader Dataset parameter. For each logical MapInfo file that it finds, it checks to see if it that file is requested by looking at the list of IDs specified in the workspace. If a match is made, or no IDs were specified in the mapping file, the MapInfo file is opened. The MapInfo reader then extracts features from the file one at a time, and passes them on to the rest of the FME for further processing. When the file is exhausted, the MapInfo reader starts on the next file in the folder.
Optionally, a single MapInfo file can be given as the dataset. In this case, only that MapInfo file is read.
Writer Overview
The MapInfo writer creates and writes feature data to MapInfo files in the folder specified by the Writer Dataset parameter. If the folder does not exist, the writer has to create it. Old MapInfo files in the folder are overwritten with the new feature data. As features are routed to the MapInfo writer, the MapInfo writer determines the file into which the features are to be written and outputs them accordingly. Many MapInfo files can be written during a single FME session.
The version of TAB files produced depends on the data being written. FME automatically writes the lowest possible version that still supports the data. For example, if time 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 data can 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 native MapInfo color settings are also present, in which case the native settings will take precedence.
The MapInfo writer will not create DAT files larger than 2GB.