Maptitude GISDK Help |
Collects summary information on the contents of an MIF file.
MIF_info = GetMIFInfo(string MIF_file_name, string detail_flag)
Argument |
Contents |
MIF_file_name |
The path and file name of the MIF file |
detail_flag |
If "True" GetMIFInfo() collects information on the entity types in the file; if "False" this information is not collected |
An array of information as follows:
Element |
Type |
Contents |
1 |
Array |
The projection name, option settings, and bounding rectangle of the file, to be passed to ImportMIF(). The projection name may be None (in which case the data are in longitude-latitude coordinates) or Local (indicating that an arbitrary coordinate system was used). |
2 |
Array |
An array of four real numbers indicating the coordinate transformation used in the file: {x_multipler, y_multipler, x_offset, y_offset}; to be passed to ImportMIF() |
3 |
String |
The MIF file version number |
4 |
Array |
An array containing one 4-element array for each data field in the .MID file that is associated with the .MIF file, with a structure as shown below |
5 |
Array |
An array of entity type-count pairs indicating the quantity of each type of entity in the file; or null if detail_flag was "False" |
Data Field Element |
Type |
Contents |
1 |
String |
The name of the field |
2 |
String |
The field type: "String", "Long", "Short", or "Real" |
3 |
String |
"True" if the field is indexed in the MapInfo file; "False" if not |
4 |
Boolean |
If "True" all values for the field are unique |
The entity type-count list includes one entry for each of the following types: NONE, POINT, TEXT, LINE, POLYLINE, SMOOTHED POLYLINE, ELLIPSE, ARC, REGION, RECTANGLE, ROUNDED RECTANGLE.
Files that use a local coordinate system have the units used in the file as the sole projection option.
// This call...
MIF_info = GetMIFInfo("c:\\county.MIF", "True")
// Returns this type of information...
// MIF_info = {
// projection_info, |
(array of info) |
// transform_info, |
(array of info) |
// "2", |
(version number) |
// {{"Name", "String", "True", "True"}, ...}, |
(attributes and types) |
// {{"POINT", 231}, {"TEXT", 100}, ...} |
(counts by entity type) |
// }
Error Type |
Meaning |
Error |
The file is not a valid MIF file |
NotFound |
There is no MIF file with the given path and file name |
Function |
Summary |
Imports features from an MIF file into a geographic file |
©2025 Caliper Corporation | www.caliper.com |