11.2. The MIF file

[Note]

The information in this section is essentially based on the MapInfo Data Interchange Format document [2].

Geographical units are described in an ASCII file by their X and Y coordinates. The .MIF file is made of an header section then a data section.

Figure 11.1. MIF file header

VERSION n
Charset ”characterSetName”
[ DELIMITER ”<c>” ]
[ UNIQUE n,n.. ]
[ INDEX   n,n.. ]
[ COORDSYS...]
[ TRANSFORM...]
COLUMNS n
  <name> <type>
  <name> <type>
  
  etc.

As shown on Figure 11.1, the header can contain the following information:

[Important]

HyperAdmin is quite sensible on the format of the header of the MIF file (one information by line). Here are some examples of the expected formats for the header of the more frequently recent and used MIF files:

  • European datasets (used for ESPON HyperAdmin maps with the EPSG 3035 Coordinates system and projection):

    Version 300
    Charset "Neutral"
    Delimiter ","
    CoordSys NonEarth Units "m" Bounds (2600301.93555, 1249109.375) (6593124.61973, 5455935.88672)
    Columns 1
      ID Char(50)
    Data
    
    (...)
    

  • EUROMED dataset:

    Version 300
    Charset "WindowsLatin1"
    Delimiter ","
    CoordSys NonEarth Units "m" Bounds (-4487557.26071, -3722255.38453) (4487557.26071, 2869559.87636)
    Columns 1
      ID Char(10)
    Data
    
    (...)
    

  • Metroborder dataset:

    VERSION 300
    Charset "WindowsLatin1"
    DELIMITER ";"
    COORDSYS NonEarth Units "m" Bounds (-743051.308162917,-145654.445989655) (-537023.603469758,123325.733156574)
    COLUMNS 1
         SHN Char(14)
    DATA
    
    (...)
    

The DATA keyword specifies both the end of the header of the MIF file and the start of the enumeration of outlines.

If the MapInfo MIF file may set different types of graphical primitives (point, line, polyline, etc.), the HyperAdmin software only expects the polygon type in order to describe the outlines of territorial units. Eeach TU whose identifier is given in the MID file (see Section 11.1) must be associated to a new entry in the MIF file under the data section, IN THE SAME ORDER, as a Region entry. In MapInfo, a Region object consists of one or more polygons. Let us describe an expected Region entry using the definition example shown on Figure 11.2.

Figure 11.2. Example of two "Region" entries in the MIF file Data section

Data
Region  2 1
  7 2
108071.871 -293320.749
96339.456 -282096.297
102833.097 -261179.193
106485.534 -258631.56
123883.98 -262981.491
122621.886 -282959.13
108071.871 -293320.749
    Pen (1,2,0) 3
    Brush (0,1)
    Center 110111.718 -275976.153
  5 4
-407753.01 -311500.065
-417000.993 -311417.496
-411718.965 -289228.641
-406514.985 -302217.573
-407753.01 -311500.065
    Pen (1,2,0) 
    Brush (0,1)
    Center -411757.989 -300364.353
Region  1 5
  11 6
2186917.593 -1518464.703
2186829.009 -1692861.786
2129979.423 -1729141.275
1933829.46 -1729141.275
1928265.747 -1699690.677
1922979.324 -1671615.192
1928499.903 -1666190.274
1941660.768 -1656068.01
2005909.794 -1679948.187
2047505.1 -1676110.68
2186917.593 -1518464.703
    Pen (1,2,0)		
    Brush (0,1)
    Center 2140313.457 -1623802.989

1

Start of the entry for the first territorial unit in our data section. This region definition will be associated to the identifier on the firts entry of the MID file. The 2 parameter near Region shows that this region is made of two polyogons (example, France may be considered as a region made of two polygons: metropol and Corse island).

2

The first polygon of this region is set with seven points whose coordinates in X Y forms are given on following lines.

3

Pen(a, b, c), Brush(a, b) and Center x y specifications are optional and they will not be read by HyperAdmin.

4

The second polygon of this region is defined with five points whose coordinates are given on the five following lines.

5

Here is the start of a new Region definition. As the second entry of the data section, this region definition will be associated to the identifier on the second line of the MID file. Region 1 indicates that this region is made of one polygon.

6

This line shows the number of points that compose the polygon: 11 points, whose coordinates are successively given on 11 folloging lines.