Introduction to the Mif/mid format

Source: Internet
Author: User
Tags character set polyline

=============mapinfo mif/mid file Format description=========

MapInfo mif/mid file Format description

(from Appendix A of MapInfo Reference)

(from Appendix A of MapInfo Resources)

This appendix describes the data Interchange format for MapInfo. In this

Appendix, you'll find information on:

This appendix describes the data Interchange format for MapInfo. In this appendix, you will find the following information:

MIF File Header

MIF Data Section

Pen, Brush, Symbol, and Font Codes in MIF

MID File

This versatile format allows generic data to is attached to a variety of

Graphical items. It's ASCII, so it's editable, relatively easy to generate,

and works on all platforms supported by MapInfo. Perhaps the best of the best

Understand the MapInfo interchange Format (MIF) is to study the sample file

At the end of this appendix in conjunction with the explanation of the file

Format. You can also create samples of your own by exporting files to MIF and

Then examining those files in a text editor.

This common format allows the addition of normal data to a variety of image elements. The Mif/mid file is ASCII-encoded, so it is editable, relatively easy to build, and works on all platforms supported by MapInfo. Perhaps the best way to understand MIF format is to study a MIF file after reading this article and holding the MIF format description. You can also create your own MIF file from the exporting files to MIF, and then study it well in a text editor.

Mapinfo data is in double file-the graphics reside in a. MIF File and textual

Data is contained in a. MID file. The textual data is delimited data, with

One row per record and either carriage return, carriage return plus line Feed,

or line Feed between lines. The MIF file has both areas-the file header and

The data section. Information on what to create MapInfo tables are in the

Header The graphical object definitions is in the data section.

MapInfo data exists in both files-the graphics data is stored in the. mif file, and the text data is stored in the. Mid file. The text data includes a row and carriage return for each entry, a carriage return line, and a line break between lines. MIF file data consists of two parts-the file header and the data area. The file header holds information about how to create the MapInfo table, and the data area holds the interpretation of the graphical object.

=================mif FILE header===============

This was a description of MIF file header with optional information in square

Brackets.

The following is a description of the MIF file header (including optional options, and the section in the following table that is enclosed by "[]" is optional).

Version N

Charset "Charactersetname"

[DELIMITER "<c>"]

[UNIQUE n,n ...]

[INDEX n,n ...]

[Coordsys ...]

[TRANSFORM ...]

COLUMNS N

<name> <type>

<name> <type>

...

...

DATA

1.Version Version number

The version clause states whether you is using Version 1, version 2, or

VERSION of the format. Version introduced with Mapinfo 3.0, allows

Multiple-section polyline objects.

"Version" describes the version of the MIF format you are using (versions 1, version 2, one of version 300). Version 300, quoted from MapInfo 3.0, allows the description of Polyline objects composed of multiple segments.

2.Charset Character Set

The CHARSET clause specifies which character set is used to create text in

The table. For example:specify ' WindowsLatin1 ' to indicate that the file was

Created using the Windows US & Western Europe character set; Specify

"Macroman" To specify the Macintosh US & Western Europe character set; Or

Specify "Neutral" to avoid converting the text into another character set.

If you is not using one of these character sets, you can determine the

Correct syntax for your character set by exporting a table and examining the

. MIF file in a text editor.

"Charset" Specifies the character set used to create the text in the table (which is not known in this case). For example, the "WindowsLatin1" file uses the Windows US & Western Europe character set; the "Macroman" description file uses the Macintosh us & Western Europe character set, or "Neutral" to prevent the text from being converted to another character set. If you do not use any of these character sets, you can pass exporting a table and examining the. MIF file in a text editor specifies the correct syntax for your character set.

3.Delimiter Separators

Specify the delimiting character in quotation marks, for example:

Specify the delimiter between the quotation marks (that is, "" or "), for example:

DELIMITER ";"

The default delimiter is Tab; If you is using the default, you does not need

The DELIMITER line.

The default delimiter is tab; If you are using the default delimiter, you do not need to "DELIMITER" the line.

4.Unique

Specify a number. This number refers to a database column; 3 is the third

Column, 7 is the seventh column, and so forth. What happens to column in the

UNIQUE list is subtle. For example, imagine, which has a database with

Highways in it. Each highway have only one name, but it might be represented

by several segments. You would put the NAME column in the UNIQUE list, while

The column containing data for the individual segments would not being in that

List. This has the effect of creating, related tables; One with names,

And one with the other attributes of the objects. How MapInfo ' s

Various street maps (STREETINFO) is prepared.

Specifies a number. This number specifies a column for a database, 3 is the third column, 7 is the seventh column, and so on. The thing that happens on a unique specified column is subtle. Imagine, for example, that you build a database of highways. Each road has only one name, but in each section it will rewrite the name again. At this point you will place the name column in a separate table, and the other columns containing information for each segment will not be placed in that table. This allows you to create two related tables: one name table and one containing additional information. This is how MapInfo's various street maps (STREETINFO) is prepared. (The sentence will not translate)

5.Index Index

To indicate this columns in the table is indexed, include a number (or a

comma-separated list of numbers) in the INDEX clause. Each number refers to

a database column; 3 is the third column, 7 was the seventh column, and so

Forth. Columns in the INDEX list would have indexes prepared for them.

"Index" indicates that the table has been indexed (what. You don't know what an index is. Check your university textbook), the "INDEX" entry includes a number (or a series of numbers). Each number specifies a column for a database, 3 is the third column, 7 is the seventh column, and so on. The columns specified in the "index" table are indexed.

6.CoordSys

Specify the COORDSYS clause to note, the data is not stored in

Longitude/latitude (warp/weft) Form. When no Coordsys clause are specified, data is

Assumed to is stored in longitude/latitude forms. All coordinates is stored

With respect to the Northeast quadrant. The coordinates for points in the

The states has a negative X while coordinates for points in Europe (east

of Greenwich) has a positive X. Coordinates for points in the Northern

Hemisphere has a positive Y while coordinates for points in the Southern

Hemisphere has a negative Y.

Specifying a "Coordsys" entry means that the data is not stored in the form of latitude and longitude. When the term "Coordsys" is not specified, the data is considered to be stored in a latitude and longitude manner. All coordinates is stored with Respectto the Northeast quadrant. (This sentence does not know how to translate). The point in the United States has a negative x-coordinate and the coordinates of the point in Europe (east of Greenwich) are positive. The Y coordinate of the point in the northern hemisphere is positive and the coordinates of the point in the southern hemisphere are negative.

Syntax 1: (Do not understand, it is best to find two examples)

Coordsys Earth

[Projection Type,

Datum

Unitname

[, Origin_longtitude]

[, Origin_lattitude]

[, Standard_parallel_1

[, Standard_parallel_2]]

[, Azimuth]

[, Scale_factor]

[, False_easting]

[, False_northing]

[, Range]]

[Bounds (Minx,miny) (Maxx,maxy)]

Syntax 2:

Coordsys Nonearth

Units Unitname

Bounds (Minx,miny) (Maxx,maxy)

Here is my understanding of "Syntax 2":

7.Transform Conversion

When you have a MIF files with coordinates stored with respect to the northwest

Quadrant (Quadrant 2), can transform them to northeast quadrant

(Quadrant 1) with a transform clause.

You can implement coordinate transformations of geographic elements through "Transform". (This sentence is my own understanding, and did not translate according to the original text)

--------------------------------------------

| Quadrant 2: | Quadrant 1: |

| Nortwest Quadrant | Norteast Quadrant |

--------------------------------------------

| Quadrant 3: | Quadrant 4: |

| Southwest Quadrant | Southeast Quadrant |

--------------------------------------------

The TRANSOFRM clause has the following syntax:

The usage of "Transform" is as follows:

TRANSFORM Xmultiplier, Ymultiplier, Xdisplacement, ydisplacement

To transform Quadrant 2 data into Quadrant 1 data, with the following

Transform clause:

If you want to convert the data in the 2nd quadrant to the first quadrant, you can use "Transform" as follows:

transform-1,0,0,0

The zeroes instruct MapInfo to ignore that parameter.

0 Tell MapInfo to ignore that item:

When you have a application which creates MIF files in Quadrant 2, you can:

When your program creates MIF files in the second quadrant, you can:

ADD the TRANSFORM clause to the MIF files

Change the application so it creates coordinates in Quadrant 1

The application so it adds a TRANSFORM clause to the MIF Files

8.Columns column

Specify the number of column. Then, for each column, create a row containing

The column name, the column type, and, for character and decimal columns, a

Number to indicate the width of the field. Valid column types is:

Specifies the number of columns. Then, for each column, create a row (including

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.