📄 mapinfo_mif.txt
字号:
x1 y1
x2 y2
]
:
[ PEN (width, pattern, color)]
[ SMOOTH ]
Chapter 1: MapInfo Data Interchange Format
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 chapter) 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 (e.g. “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 chapter) 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 ]
Chapter 1: MapInfo Data Interchange Format
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)]
Pen Styles
The Pen clause specifies the width, pattern, and color of a linear object, such as a line, polyline
arc, or the border of a region. The Pen clause has the following syntax:
PEN (width, pattern, color)
Width is a number from 1 to 7. 1-7 is the width in screen pixels. 11-2047 are values that will be
converted to points:
penwidth = (number of points * 10) + 10
0 is only valid when the pen pattern is 1 for invisible lines.
Color is an integer, representing a 24–bit RGB color value.
Pattern is an integer from 1 to 118; pattern number 1 is invisible. The pattern number
corresponds to a pen number in the pen file. The pen file can be modified using a pen editor.
Valid pen numbers are from 1 to maximum number of pens in the pen file, which should not
exceed 127. If a pen style is interleaved, 128 will be added to the pen number. Interleaved
styles are in the range 129-255. Because the pen file can be modified, and interleaved can be
specified, the pen pattern can be a number between 1-255.
Chapter 1: MapInfo Data Interchange Format
The following table lists the available line styles by default:
Chapter 1: MapInfo Data Interchange Format
Brush Styles
Brush specifies the pattern, foreground color, and background color of a filled object, such as a
circle or region. The Brush clause has the following syntax:
Brush (pattern, forecolor [, backcolor ])
The forecolor and backcolor arguments are both integers, representing 24–bit RGB color
values. Pattern is a number from 1 to 71. Note: Pattern number 1 is “no fill,” and pattern
number 2 is a solid fill. Pattern numbers 9-11 are reserved. The following table illustrates the
available styles:
Tip: To specify a transparent fill style, use pattern number three or larger, and omit the
backcolor argument. For example: Brush( 5, 255 )
Chapter 1: MapInfo Data Interchange Format
Symbol Styles
The Symbol clause specifies the appearance of a Point object. There are three different forms of
the Symbol clause, described below.
Symbol Clause-MapInfo 3.0 Syntax
The Symbol clause specifies the appearance of a Point object. There are three different forms of
the Symbol clause. To specify a symbol style using “Old MapInfo Symbols” (the symbols that
were used in earlier versions of MapInfo), use the following syntax:
SYMBOL (shape, color, size)
The shape argument is an integer value, 31 or larger; 31 represents a blank symbol (i.e. the
object will not be visible). The standard set of symbols includes symbols 32 through 67,
inclusive, but the user can customize the symbol set by using the Symbol application.
The color argument is an integer representing a 24–bit RGB color value.
The size argument is an integer from 1 to 48, representing a point size.
The following table lists the default symbols provided with MapInfo:
Chapter 1: MapInfo Data Interchange Format
Symbol Clause-TrueType Font Syntax
To specify a symbol style based on a character from a TrueType font, use the following syntax:
SYMBOL (shape, color, size, fontname, fontstyle, rotation)
The fontname argument is a text string that identifies the name of a font (e.g. “Wingdings”).
The fontstyle argument is an integer that controls settings such as Bold. The following table
lists the values you can use as fontstyle.
fontstyle value Effect on Symbol style
0 Plain text
1 Bold text
16 Black border around symbol
32 Drop shadow
256 White border around symbol
To specify two or more style attributes, add the values from the left column. For example, to
specify Bold and Drop Shadow, use 33.
The rotation argument is a floating–point number, representing a rotation angle, in degrees.
Chapter 1: MapInfo Data Interchange Format
Symbol clause - Custom Bitmap File Syntax
To specify a symbol style based on a character from a TrueType font, use the following syntax:
SYMBOL (filename, color, size, customstyle)
The filename argument is a text string that identifies a bitmap file (e.g. “Arrow.BMP”) in the
CustSymb directory.
The customstyle argument is an integer that controls whether color and background attributes
are used. The following table lists the values you can use as customstyle:
customstyle value Effect on Symbol style
0 Both the Show Background setting and the Apply
Color setting are off; symbol appears in default state.
White pixels in the bitmap appear transparent, allowing
whatever is behind the symbol to show through.
1 The Show Background settings is on; white pixels in
the image are opaque.
2 The Apply Color setting is on; non–white colors in the
image are replaced with the Symbol’s color value.
3 Both Show Background and Apply Color settings are
on.
Chapter 1: MapInfo Data Interchange Format
Font Styles
The Font clause specifies the appearance (typeface, color, etc.) of text objects. The Font clause
has the following syntax:
FONT (”fontname”, style, size, forecolor [, backcolor] )
Fontname in double quotation marks is the typeface to be displayed. Style is the text attribute
of the typeface as shown in the following table. Size must be 0 in a MIF file, because each text
object on a Map is attached to the map itself (thus the text size changes as you zoom in or out).
Forecolor is an integer representing a 24–bit RGB color. The background color is optional; if
you include it, MapInfo fills the area behind the text with the color you specify.
style value Effect on Font Appearance
0 Plain
1 Bold
2 Italic
4 Underline
16 Outline (only supported on the Macintosh)
32 Shadow
256 Halo
512 All Caps
1024 Expanded
To specify two or more style attributes, add the values from the left column. For example, to
specify Bold and All Caps, use 513.
Chapter 1: MapInfo Data Interchange Format
Colors
Colors are often defined in relative concentrations of red, green, and blue. Each color is a
number from 0 to 255, inclusive; the RGB value of a color is calculated by the following
formula:
(red * 65536) + (green * 256) + blue
These are some often used colors and their values:
Red: 16711680
Green: 65280
Blue: 255
Cyan: 65535
Magenta: 16711935
Yellow: 16776960
Black: 0
MID File
The MID file contains data, one record of data per row, delimited by the character specified in
the delimiter statement. The default delimiter is Tab. Each row in the MID file is associated
with a corresponding object in the MIF file; first row with first object, second row with second
object.
If delimiter character is included as part of the data in a field, enclose the field in quotation
marks.
The MID file is an optional file. When there is no MID file, all fields are blank.
Chapter 2: Creating Your Own Coordinate System
MapInfo provides over 300 predefined coordinate systems. However, you may want to use
another coordinate system. You create another coordinate system by changing the parameters
of one of the predefined systems or by defining new coordinate systems from scratch. This
section tells you what those parameters are and how to make the changes. In this chapter, you
will find information on:
. Projections and Coordinate Systems
. Elements of a Coordinate System
. Editing the MAPINFOW.PRJ File
. Affine Transformations
. Frequently Asked Questions on Projections
. More Information on Projections
Projections and Coordinate Systems
While the terms “projection” and “coordinate system” are often used interchangeably, they do
not have the same meaning. A projection is an equation or set of equations containing a set of
parameters—the exact number and nature of the parameters depends on the projection. When
each of those parameters has been assigned a specific value, the result is a coordinate system.
The items listed in the Choose Projection dialog are coordinate systems.
Projection is the method of reducing the distortion of curved earth features on a flat paper
map or computer screen. A coordinate system is a collection of parameters that describe
coordinates. One of the parameters is projection.
Elements of a Coordinate System
This section briefly defines the elements of a coordinate system. The first element in defining a
coordinate system is the set of equations for the system’s projection. The elements after that
are the parameters for the projection. None of the coordinate systems require all of these
parameters.
Chapter 2: Creating Your Own Coordinate System
Projections and Their Parameters
The following table indicates the parameters applicable to each projection. They are listed in
the order they appear in the MAPINFOW.PRJ file.
1lelaraPdradnatS
2lelaraPdradnatS
edutignoL,
edutitaL,
gnihtroNeslaF
gnitsaEeslaF
rotcaFelacS
htumizA
msutitnU
nigirO
nigirO
egnaR
aD
Albers Equal–Area Conic X X X X X X X X
Azimuthal Equidistant X X X X * X
Cylindrical Equal Area X X X X
Eckert IV X X X
Eckert VI X X X
Equidistant Conic X X X X X X X X
Gall X X X
Hotine Oblique Mercator X X X X X X X X
Lambert Azimuthal Equal–Area X X X X * X
Lambert Conformal Conic X X X X X X X X
Longitude–Latitude X
Mercator X X X
Miller X X X
Mollweide X X X
New Zealand Map Grid X X X X X X
Regional Mercator X X X X
Robinson X X X
Sinusoidal X X X
Stereographic X X X X X X X
Swiss Oblique Mercator X X X X X X
Transverse Mercator X X X X X X X
Polyconic X X X X X X
* MapInfo supports the Azimuthal Equidistant and Lambert Azimuth Equal–Area projections
in the polar aspect only. The Origin Latitude for these projections must be either 90 or -90.
Chapter 2: Creating Your Own Coordinate System
Projection
The projection is the equation or equations used by a coordinate system. The following list
names the projections MapInfo uses and gives the number used to identify the projection in
the MAPINFOW.PRJ file:
Number Projection
9 Albers Equal–Area Conic
5 Azimuthal Equidistant (polar aspect only)
2 Cylindrical Equal–Area
14 Eckert IV
15 Eckert VI
6 Equidistant Conic, also known as Simple Conic
17 Gall
7 Hotine Oblique Mercator
4 Lambert Azimuthal Equal–Area (polar aspect only)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -