# MapInfo TAB and MIF/MID

MapInfo datasets in native (TAB) format and in interchange (MIF/MID) format are supported for reading and writing. Update of existing files is not currently supported.

Note: In the rest of this document "MIF/MID File" is used to refer to a pair of .MIF + .MID files, and "TAB file" refers to the set of files for a MapInfo table in binary form (usually with extensions .TAB, .DAT, .MAP, .ID, .IND).

The MapInfo driver treats a whole directory of files as a dataset, and a single file within that directory as a layer. In this case the directory name should be used as the dataset name.

However, it is also possible to use one of the files (.tab or .mif) in a MapInfo set as the dataset name, and then it will be treated as a dataset with one single layer.

MapInfo coordinate system information is supported for reading and writing.

## Creation Issues

The TAB File format requires that the bounds (geographical extents) of a new file be set before writing the first feature. However, there is currently no clean mechanism to set the default bounds of a new file through the OGRDataSource interface.

We should fix the driver at some point to set valid default bounds for each projection, but for the time being, the MapInfo driver sets the following default bounds when a new layer is created:

- For a file in LAT/LON coordinates: BOUNDS (-180, -90) (180, 90)
- For any other projection: BOUNDS (-30000000, -15000000) (30000000, 15000000)

MapInfo feature attributes suffer a number of limitations:

- Only Integer, Real and String field types can be created. The various list, and binary field types cannot be created.

- For String fields, the field width is used to establish storage size in the .dat file. This means that strings longer than the field width will be truncated.

- String fields without an assigned width are treated as 254 characters.

To create MID/MIF instead of TAB files use the dataset creation option "FORMAT=MIF".

### See Also

- MITAB Page