MapInfo MIF/MID Reader/Writer

The MapInfo Data Interchange Format (MIF) Reader/Writer allows FME to read and write MapInfo® import and export files.

MIF is a published ASCII format used by the MapInfo product for input and export. The MapInfo Reference Manual describes the MIF format and all constants it uses for color, style, symbol, and fill patterns.

MapInfo Interchange Format Files are often called MIF or MIF/MID files.

Overview

MapInfo is a two-dimensional (2D) 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.

MIF files store both feature geometry and attribution. A logical MIF file consists of two physical files, having the following filename extensions:

Filename Extension

Contents

.mif

Vector geometric data

.mid

Attributes for the geometric data

These extensions are added to the basename of the MIF file.

The MapInfo reader and writer support the storage of point, line, polyline, arc, ellipse, rectangle, rounded rectangle, region (polygon), and text geometric data in .mif files. The MIF 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 a .mif file has display properties such as pen and brush width, pattern, and color. In addition, each entity has a row of attributes stored in an associated .mid file. A single .mif file contains many different types of geometry however, the associated attribute in the .mid file must have the same number and type of fields for each entity in the .mif file. The order of the entries in the two files is synchronized. For example, the second geometric entity in the .mif file has the attributes held in the second row of the .mid file.

The number and type of attributes associated with each entity is specified by the user. There must be at least one attribute field in the .mid file.

The following example shows a MIF file containing three region entities in it. Note that the second polygon contains a hole, and 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 MIF dataset to be a collection of MIF files in a single folder. The attribute definitions for each MIF file must be defined in the workspace before it can be read or written.