MIF Data Section - MapInfo_Pro - 2023

MapInfo Pro Help

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapInfo Pro
Version
2023
Language
English
Product name
MapInfo Pro
Title
MapInfo Pro Help
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:39:16.995000

The MIF file data section follows the header and must be introduced with DATA on a single line:

DATA

The data section of the MIF file can have any number of graphical primitives, one for each graphic object. MapInfo Pro matches up entries in the MIF and MID files, associating the first object in the MIF file with the first row in the MID file, the second object in the MIF file with the second row in the MID file, and so on.

When there is no graphic object corresponding to a particular row in the MID file, a "blank" object (NONE) must be written as a place holder in the corresponding place in the MIF file.

NONE

The graphical objects that can be specified are:

  • point
  • line
  • polyline
  • region
  • arc
  • text
  • rectangle and rounded rectangle
  • ellipse
  • multipoint
  • collection

A point object takes two parameters; an X coordinate and a Y coordinate. As an option, specify the symbol that represents the point. Symbols are designated by numbers. If you omit the SYMBOL clause, the current symbol is used.

POINT x y
	[ SYMBOL (shape, color, size)] 

Each MapInfo Pro version supports variations on the SYMBOL clause; see Symbol Styles in this section.

A line objects requires four parameters; an X and a Y coordinate for each end point. As an option, specify a pen type. When no pen type is specified, the current pen type is used.

LINE x1 y1 x2 y2 
	[ PEN (width, pattern, color)]

A polyline object consists of one or more sections. If the polyline has more than one section, include the MULTIPLE keyword, followed by the number of sections. For each section, specify a numpts argument (which indicates the number of nodes in that section), followed by an x/y coordinate pair for each node. Use the optional PEN clause (described later in this section) to specify the line style. If you include the optional SMOOTH keyword, the polyline is smoothed.

PLINE [ MULTIPLE numsections ] 
	numpts1
	x1 y1
	x2 y2
		:
[ numpts2
	x1 y1
	x2 y2 ]
		: 
	[ PEN (width, pattern, color)]
	[ SMOOTH ] 

A region object consists of one or more polygons. Specify the number of polygons through the numpolygons argument (immediately after the REGION keyword). For each polygon, specify a numpts argument (which indicates the number of nodes in that polygon), followed by an x/y coordinate pair for each node. Use the optional PEN and BRUSH clauses (described later in this section) to specify the object's style. Use the optional CENTER clause to define the object's centroid explicitly. The centroid must be within the object.

REGION numpolygons 
	numpts1 
		x1 y1 
		x2 y2 
		:
[	numpts2 
		x1 y1 
		x2 y2 ]
		:
	[ PEN (width, pattern, color)]
	[ BRUSH (pattern, forecolor, backcolor)]
	[ CENTER x y ] 

An arc requires the diagonally opposite corners of its bounding rectangle and the beginning (a) and ending (b) angles of the arc in degrees, moving counter-clockwise with zero at three o'clock. As an option, specify the pen type. (An arc specifies a section of an ellipse, the corners of which are determined by the bounding rectangle.)

ARC x1 y1 x2 y2 
	a b 
	[ PEN (width, pattern, color)]

A text object consists of a text string, up to 255 characters long. To make the text string wrap onto multiple lines, insert the characters \n within the textstring argument (for example, "First line \nSecond line \nThird line"). The x1, y1, x2, and y2 arguments specify the location of the text on the map. Spacing can be 1.0 (single spacing), 1.5, or 2.0 (double spacing). Use the Font clause (described later in this section) to control the typeface, etc.

TEXT "textstring"
	x1 y1 x2 y2 
	[ FONT...]
[ Spacing {1.0 | 1.5 | 2.0}]
[ Justify {Left | Center | Right}]
[ Angle text_angle]
[ Label Line {simple | arrow} x y ]

A rectangle requires the coordinates of the diagonally opposite corners. As an option, specify pen and brush types.

RECT x1 y1 x2 y2
	[ PEN (width, pattern, color)]
	[ BRUSH (pattern, forecolor, backcolor)]

A rounded rectangle requires the coordinates of the diagonally opposite corners and the degree of rounding (a). As an option, specify pen and brush types. Degree of rounding is expressed in coordinate units.

ROUNDRECT x1 y1 x2 y2
	a 
	[ PEN (width, pattern, color)]
	[ BRUSH (pattern, forecolor, backcolor)]

An ellipse object requires the coordinates of the diagonally opposite corners of its bounding rectangle. As an option, specify pen and brush types.

ELLIPSE x1 y1 x2 y2
	[ PEN (width, pattern, color)]
	[ BRUSH (pattern, forecolor, backcolor)] 

A multipoint object takes multiple parametrics, consisting of xy coordinate pairs. The number of points is indicated by the num_points parameter as an option, specify the symbol that represents the multipoint. Symbols are designed by numbers. If you omit the SYMBOL claus4e, the current symbol is used.

MULTIPOINT num_points
	 x1 y1 x2 y2 x3 y3 ...

Example:

Multipoint 7
-3.113504 10.532464
-2.113504 11.532464
-1.113504 12.532464
-0.113504 14.532464
-4.113504 11.532464
-0.113504 8.532464
0.886496 13.532464
	Symbol (35,0,12) 
Collection format
Collection num_parts
Region
.......
Pline
......
Multipoint
..........

A collection object takes multiple parameters, consisting of the parameters of the object types included in the collection. Individual formats for the Region, Pline, and Multipoint parts of the collection are the same as those for the corresponding object type. The num_parts parameter is required if the number of parts in the collection is less than three. If this number is omitted, it is assumed that the collection contains all three parts.

In exports, MapInfo Pro always writes this number into the MIF file.

COLLECTION num_parts
Region
Pline
Multipoint
EXAMPLE:
Collection 3
Region 3
	5
4.850832 10.077456
5.850832 11.077456
6.850832 13.077456
12.850832 19.077456
4.850832 10.077456
	4
-5.149168 0.077456
-4.149168 1.077456
-3.149168 3.077456
-5.149168 0.077456
	4
14.850832 20.077456
15.850832 21.077456
16.850832 23.077456
14.850832 20.077456
	Pen (1,2,0) 
	Brush (2,16777215,16777215)
	Center 8.850832 14.577456
Pline 3
-7.149168 0.077456
-3.149168 -2.922544
-2.149168 2.077456
	Pen (1,2,0) 
Multipoint 2
-6.149168 -0.922544
-5.149168 0.077456
	Symbol (35,0,12)