A file of MIF format is a text file which contains graphic data (features) and also possibly description of a table of data possessing attributive data linked with features.
There are some considerable differences in structures of data of MapInfo and ObjectLand, these differences should be taken into account in import.
There is no notion of feature type in MapInfo, that is why from the point of view of ObjectLand all features of one MIF file can differ only in their spatial category.
Every area feature of MapInfo belongs to one of the standard shapes such as a polygon, an ellipse (and a circle in a special case), a rectangle or a rectangle with round corners. In the course of performing import all these shapes are transformed into polygons, arcs of circles and ellipses are approximated by polylines. By analogy, shapes of line features present in MapInfo, such as a line (which is a single line segment), a polyline and an arc become polylines in import.
A line feature of MapInfo can consist of several polyline sections, and an area feature – of several polygon sections. In the course of import every section is transformed to a separate feature. If there was a link with table record for composite MapInfo feature, this link will be set for every feature obtained from sections – parts of a complex feature.
A point called centroid which is a center of the present MapInfo polygon calculated automatically or specified in an explicit form can be linked with an area feature. There is no notion of a centroid in ObjectLand, however, in the course of import the possibility to import centroids as an individual point feature type is provided.
Object description in MIF file can include indication of displaying style of this feature specified in the form of a number of standard fill, line, MapInfo symbol, and also background and foreground color. During import to ObjectLand data about styles is ignored.
Description of structure of linked table of attributive data kept in MIF file includes names of data fields, their types and sizes. The attribute “Unique” and the attribute “Indexed” can be also indicated for fields.
Table data itself is stored in an optional file with MID extension. MID file name should coincide with the name of the corresponding MIF file. Record fields are separated from each other using the separator character specified in MIF file. Correspondence between features described in MIF file and records of MID file are set in succession order in files. Thus, one line of MID file corresponds to every feature. This line contains a record about the corresponding feature. Empty lines of MID file denoting absence of table data about the corresponding feature are allowed. If some table records are not linked with any feature, a special dummy feature “None” is used in MIF file.
In table 64-1 there is a list of field types used in files of MID format and field types of ObjectLand tables corresponding to them in the course of import.
Field type of MID file | Field type of ObjectLand table |
Integer | Integer |
Smallint | Integer |
Decimal without fractional part | Integer |
Decimal with fractional part | Real |
Float | Real |
Date | Date |
Char | String |
Logical | Boolean |
Table 64-1. Correspondence of field types when importing from MID files
As it is seen from the table, mainly there is natural correspondence between MID and ObjectLand field types. The most serious difference is connected with processing fields of the type “decimal” which can represent integer numbers as well as real ones depending on the number of digits in fractional part specified in the field description. Apart form that, field width, that is, maximum possible length of the string, is not limited for ObjectLand string fields. In this connection indication of string field width of MID file is ignored.
Detailed description of formats of MIF and MID files is given in manuals on the system MapInfo.