Structure of a text file of settings |
The text file of settings consists of header and records. Record of header has TXT key in the beginning. Record of header consists of the fields separated by blanks.
Structure of header record of a text file of settings
Key Version RSC-name Date and time of header creation Reserve
for example the file has a following appearance of header
.TXT VERXX 200t50v.rsc 07/02/2000 10:45:55 AM
,where VERXX can be VER01 or VER02, defining versions of a text file.
In version 01 the order of components RGB color COLOR has a following appearance-
(Blue, Green, Red).
In version 02 the order of components RGB color COLOR has other appearance-
(Red, Green, Blue).
Structure of records for section .POINT of point objects
Name of section Number of version
.POINT VER01
Each section consists of records.
Each record consists of the fields separated by blanks.
Field1 Field2 Field3 Field4 Field5 … Field9 ......................................................................................... KKKKKKKK NN DESCRIPTION OF OBJECT IN MapInfo 111111111 0
where Field1 - KKKKKKKK - a classification code of object;
Field2 - NN - a serial number of object in a series (0 - there is no series) Field3 - Field9 - contain the description of object in MapInfo
FONT NUMBER COLOR SIZE ANGLE BACKGROUND EFFECTS
Example
" MapInfo Gaz&Oil " 35 (127, 0, 127) 10 0 0 0
, where Field3 - FONT: " MapInfo Gaz&Oil " - a name of the font table; Field4 - NUMBER: 35 - number of a symbol in the fonts table; Field5 - COLOR: (127, 0, 127) - color of a symbol in RGB;
The order of components RGB color COLOR depends on the version of a text file (See structure of header of a text file)
Field6 - SIZE: 10 - size of a symbol in points (1/72 inch) Field7 - ANGLE: 0 - angle of a symbol turn;
Field8 - BACKGROUND: 0 - code of background: 0 - no: 1 - aureole; 2 - edging.
Field9 - EFFECTS: 0 - effects: 0 - no; 1 - contour, casting a shadow; 2 - thickened contour; 3 - both.
Structure of records for section .LINE of linear objects
Name of section Number of version
.LINE VER01
The section consists of records.
Each record consists of the fields separated by blanks.
Field1 Field2 Field3 Field4 Field5 ………………………………………………………………………….
KKKKKKKK NN DESCRIPTION OF OBJECT IN MapInfo 111111111 1
where Field1 - KKKKKKKK - a classification code of linear object;
Field2 - NN - a serial number of object in a series (0 - there is no series) Field3 - Field5 - contain the description of object in MapInfo
STYLE WIDTH COLOR
Example
35 1 (127, 127, 127)
, where Field3 - STYLE: 35 - a code of a line type; Field4 - WIDTH: 1 - a code of a line thickness. Field5 - COLOR: (127, 127, 127) - color of a line (24 bit number in RGB);
The order of components RGB color COLOR depends on the version of a text file (See structure of header of a text file)
Table The list of primary colors .............................................................................................................................. .............................................................................................................................. : Color C o m p o n e n t s (R,G,B) : : N / N red-R green-G blue-B color : .............................................................................................................................. 0 0 0 0 black 1 0 0 168 dark blue 2 0 168 0 green 3 0 84 84 dark green 4 168 0 0 dark red 5 252 168 84 sand 6 168 84 0 brown 7 168 168 168 light grey 8 84 84 84 dark grey 9 0 168 252 blue 10 84 252 84 light green 11 84 84 252 dark blue 12 252 0 84 red 13 252 84 252 lilac or crimson 14 252 252 84 yellow 15 252 252 252 white ........................................................................................................................................
Structure of records for section .SQUARE of square objects
Name of section Number of version
.SQUARE VER01
The section consists of records.
Each record consists of the fields separated by blanks.
Field1 Field2 Field3 Field4 ............… Field8 ......................................................................................... KKKKKKKK NN DESCRIPTION OF OBJECT IN MapInfo
111111111 1
where Field1 - KKKKKKKK - a classification code of square object;
Field2 - NN - a serial number of object in a series (0 - there is no series)
Field3 - Field8 - contain the description of object in MapInfo
PATTERN FOREGROUND BACKGROUND STYLE COLOR WIDTH
Example 49 (127, 127, 127) (0, 0, 0) 35 (88, 78, 87) 1
, where Field3 - PATTERN: 35 - a code of filling type; Field4 - FOREGROUND: (127, 127, 127) - color of the foreground in RGB; Field5 - BACKGROUND: (0, 0, 0) - color of a background; Field6 - STYLE: 35 - a code of a line type; Field7 - COLOR: (88, 78, 87) - color of a line in RGB; Field8 - WIDTH: 1 - a code of a line thickness.
The order of components RGB color FOREGROUND, BACKGROUND, COLOR depends on the version of a text file (see structure of header of a text file)
Structure of records for section .TITLE of objects such as a title
Name of section Number of version
.TITLE VER01
The section consists of records.
Each record consists of the fields separated by blanks.
Field1 Field2 Field3 ….. Field4 … … … … … Field9 KKKKKKKK NN THE DESCRIPTION OF OBJECT IN MapInfo 111111111 1
where Field1 - KKKKKKKK - a classification code of text object;
Field2 - NN - a serial number of object in a series (0 - there is no series) Field3 - Field9 - contain description of object in MapInfo
FONT SIZE TEXTCOLOR BACKGROUND COLOR EFFECTS ALIGN
Example
" Arial Cyr " 48 (123, 45, 67) 0 (0, 0, 0) 0 0
, where Field3 - FONT : " Arial Cyr " - font name; Field4 - SIZE : 48 - the font size; Field5 - TEXTCOLOR : (123, 45, 67) - font color (RGB); Field6 - BACKGROUND: 0 - a code of a font background: 0 - no background 1 - aureole of font symbols; 2 - continuous background. Field7 - COLOR : (0, 0, 0) - color of a font background (RGB); Field8 - EFFECTS : 0 - a code of a font style: 0 - no style; 1 - dedicated; 2 - italic; 4 - underlined; 16 - all uppercase; 256 - tinged; 4096 - advanced. Field9 - ALIGN : 0 - no horizontal alignment 1 - alignment to the left 2 - to the right 4 - on the center
Structure of records for section .VECTOR of vector objects
Name of section Number of the version
.VECTOR VER01
The section consists of records.
Each record consists of the fields separated by blanks.
Field1 Field2 Field3 Field4 … … … … … … … … ….. Field6 … … … … … … … … … … … … … … … … … … … … … … … … … … … … …. …. KKKKKKKK NN LOC THE DESCRIPTION OF OBJECT IN MapInfo 111111111 1 0
where Field1 - KKKKKKKK - a classification code of vector object;
Field2 - NN - a serial number of object in a series (0 - there is no series) Field3 - LOC - the code of object type, can accept one of values: 0 - linear object; 1 - square object; 2 - point object.
Parameter LOC defines the following it DESCRIPTION of OBJECT in MapInfo.
Structure of the lines, representing vector object in MapInfo.
The order of components RGB color COLOR, FOREGROUND, BACKGROUND depends on the version of a text file (see structure of header text file)
Vector object MAP is represented only by one of three objects MIF: 1) In case of linear object (LOC = 0) the OBJECT DESCRIPTION in MapInfo should have a following appearance:
Field4 - Field6 - contain description of object in MapInfo
STYLE WIDTH COLOR
Example
35 1 (127, 127, 127)
, where Field4 - STYLE : 35 - a code of a line type;
Field5 - WIDTH : 1 - a code of line thickness.
Field6 - COLOR : (127, 127, 127) - color of a line (RGB);
2) In case of square object (LOC = 1) the OBJECT DESCRIPTION in MapInfo should have a following appearance:
Field4 - Field9 - contain description of object in MapInfo
PATTERN FOREGROUND BACKGROUND STYLE COLOR WIDTH SQUARE
, where SQUARE consists of three numbers:
SQUARE_WIDTH SQUARE_LENGTH SQUARE_OUT
Example
49 (127, 127, 127) (0, 0, 0) 35 (88, 78, 87) 1 8 12 0
, where Field4 - PATTERN : 35 - a code of filling type;
Field5 - FOREGROUND : (127, 127, 127) - color of the foreground (RGB);
Field6 - BACKGROUND : (0, 0, 0) - color of a background (RGB);
Field7 - STYLE : 35 - a code of a line type;
Field8 - COLOR : (88, 78, 87) - color of a line (RGB);
Field9 - WIDTH : 1 - a code of line thickness.
Further there are the fields containing the the sizes description of vector area SQUARE:
Field10 - SQUARE_WIDTH : 10 - width of the area;
Field11 - SQUARE_LENGTH : 12 - length of the area;
Field12 - SQUARE_OUT : 0 - offset from a base line.
3) In case of point object (LOC = 2) the OBJECT DESCRIPTION In MapInfo should have a following appearance:
Field4 - Field10 - contain description of object in MapInfo
FONT NUMBER COLOR SIZE ANGLE BACKGROUND EFFECTS
Example
"MapInfo Gaz&Oil" 35 (127, 0, 127) 10 0 0 0
, where Field4 - FONT : "MapInfo Gaz&Oil" - a name of font table; Field5 - NUMBER : 35 - number of a symbol in font table; Field6 - COLOR : (127, 0, 127) - color of a symbol (RGB); Field7 - SIZE : 10 - the size of a symbol in points (1/72 inches) Field8 - ANGLE : 0 - angle of a symbol turn; Field9 - BACKGROUND : 0 - a code of a background: 0 - no: 1 - aureole; 2 - edging.
Field10 - EFFECTS : 0 - effects: 0 - no; 4 - contour, casting a shadow; 5 - thickened contour; 6 both.
Structure of records for section .MIXED of mixed objects
Name of section Number of version
.MIXED VER01
The section consists of records.
Each record consists of the fields separated by blanks.
Field1 Field2 Field3 KKKKKKKK NN NUMBER 111111111 1 3
where Field1 - KKKKKKKK - a classification code of object;
Field2 - NN - a serial number of object in a series (0 - there is no series)
Field3 - NUMBER - number of the lines, following further and containing data about description of mixed object in MapInfo.
Structure of the lines, representing mixed object in MapInfo:
Field4 … … … … … … … … … … … … Field10 ....................................................................... LOC DESCRIPTION OF OBJECT IN MapInfo
where Field4 - LOC - the code of object type, can accept one of values: 0 - linear object; 2 - point object; 3 - text object.
Parameter LOC defines the OBJECT DESCRIPTION, following it, in MapInfo.
In case of linear object (LOC = 0) the OBJECT DESCRIPTION In MapInfo should have a following appearance:
Field4 - Field6 - contains the description of object in MapInfo
LOC STYLE WIDTH COLOR
The order of components RGB color COLOR, TEXTCOLOR depends on the version of a text file (see structure of header of a text file)
Example
0 35 1 (127, 127, 127)
, where Field4 - LOC : 0 - the linear description of object; Field5 - STYLE : 35 - a code of line type; Field6 - WIDTH : 1 - a code of line thickness. Field7 - COLOR : (127, 127, 127) - color of a line in RGB;
In case of point object (LOC = 2) the OBJECT DESCRIPTION in MapInfo should have a following appearance:
Field4 - Field11 - contains description of object in MapInfo
LOC FONT NUMBER COLOR SIZE ANGLE BACKGROUND EFFECTS
Example
2 "MapInfo Gaz&Oil" 35 (127, 0, 127) 10 0 0 0
, where Field4 - LOC : 2 - the object description in the form of a conventional sign; Field5 - FONT : "MapInfo Gaz&Oil" - a name of fonts table; Field6 - NUMBER : 35 - number of a symbol in fonts table; Field7 - COLOR : (127, 0 127,) - color of a symbol (R G B); Field8 - SIZE : 10 - the size of a symbol in points (1/72 inches) Field9 - ANGLE : 0 - angle of a symbol turn;
Field10 - BACKGROUND : 0 - a code of background: 0 - no; 1 - aureole; 2 - edging.
Field11 - EFFECTS : 0 - effects: 0 - no; 7 - a contour, casting a shadow; 8 - thickened contour; 9 - both. In case of text object (LOC = 3) the OBJECT DESCRIPTION in MapInfo should have a following appearance:
Field4 - Field11 - contain description of object in MapInfo
LOC FONT SIZE TEXTCOLOR BACKGROUND COLOR EFFECTS ALIGN
Example
3 "Arial Cyr" 48 (123, 45, 67) 0 (0, 0, 0) 0 0
, where Field4 - LOC : 3 - the title; Field5 - FONT : "Arial Cyr" - font name; Field6 - SIZE : 48 - font size; 7 - TEXTCOLOR : (123, 45, 67) - color of a font (RGB);
Field8 - BACKGROUND : 0 - a code of font background: 0 - no background; 1 - aureole of font symbols; 2 - continuous background.
Field9 - COLOR : (0, 0, 0) - color of font background (RGB);
Field10 - EFFECTS : 0 - a code of font style: 0 - no style; 1 - dedicated; 3 - italic; 4 - underlined; 16 - all uppercase; 256 - tinged; 4096 - advanced.
Field11 - ALIGN : 0 - no horizontal alignment 1 - alignment to the left 2 - to the right 4 - on the center
Format of service section .SETUP
The section is created automatically, but can be edited manually. Location of section - in the end of a text file. .SETUP - header (key) from the first position; Further there are strings .. .. Format of strings: field1 field2 field3 , where field1 - number (key) of the table field in header of MIF file; field2 - name of a table field; field3 - attribute include/not include (1/0) this field into the table.
Structure of records for section .SQUARE of square objects. To set value of a line thickness in points, it is necessary to calculate value for record in M2M by the following formula:
Value = Point *10+10, where Point - required line thickness in points (MapInfo), Value - number which is stored in m2m.
Example: For object 51400000 a line thickness should be 0,5 point. Then value = 0.5*10+10=15. In a file m2m settings will look like this: 51400000 0 61 (255,102,0) (0,0,0) 2 ( 0, 0, 0) 15 |