Importing MapInfo files

Importing MapInfo files

This process enables you to import data into DRAINS from one to six sets of MapInfo files, plus an optional background from a DXF file. The procedure is pretty much the reverse of the exporting process for MapInfo files.

MapInfo stores spatial information in a set of two ASCII files:

  • a MIF (MapInfo Interchange File) is the main file defining a format for data records associated with objects (points, lines or polygons) and the coordinates of the vertices of objects,

  • a MID file containing a contents of a table of attributes associated with each object.

All files must have the same initial part to their name; for example for a set of pits and nodes the three files would be: Gregory_Nodes.mif and Gregory_Nodes.mid.

The tabular data describe pits, pipes and other components of a drainage system. There are six types of inputs. The MIF files for a full set would be named: Gregory_Nodes.mif, Gregory_Pipes.mif, Gregory_Catchments.mif, Gregory_OverflowRoutes.mif, Gregory_Services.mif and Gregory_Survey.mif. The MID files must have similar names. Not all of these are needed to make a transfer; DRAINS accepts the nodes and pipes alone.

If you wish to model an existing drainage system in DRAINS and MapInfo records are already available, you need to edit these into the format required by DRAINS, which is the same as that generated in the export process that creates MapInfo files from DRAINS data.  You can see this format by exporting a small system and examining the resulting tables.

For nodes, in the MID file a table with the following 12 headers for columns or "fields' are required:


For pipes, a table with the following 11 headers for columns or "fields' are required:

Results of analyses are not required and will be ignored if present.  For information on the other four components, refer to the exported MapInfo file formats.

If this is an initial transfer, it is unlikely that all the information required by DRAINS will be available in the GIS.  In the files to be transferred, all the required information that is already in the GIS should be included.  It is then a matter of judgment as to whether you add additional data in these files, or use dummy values.

To illustrate the process, consider the following example, named "Oldtown".


The node information is associated with the table shown above, which can be set up in MapInfo or a text editor.  The corresponding pipes table is similar.

From the MapInfo layers, a DXF file containing a background for the DRAINS model can be created.  All layers in this will be included in the background.


You will need to place all the files to be transferred into the same Windows folder.  The files to be transferred must include at least the nodes file.

To make the transfer, you need to set up a DRAINS model with the Horton (ILSAX) hydrological model and pit and pipe data bases that you require and then use the File -> Import    ► Mapinfo MIF files… option, which will display the following message:


After "Yes" is entered, a window for opening files appears.  You must select the MapInfo MIF files to be transferred.  Only one file need be selected; the others in the same folder will be transferred as well.

The transfer will then take place and the pits and pipes will come into view.  As the window below shows, the data information is transferred over and further data can be added to the property sheets.


With this setup it is possible to import a new or additional background.  Using the File ► Import  ► Import DXF background option brings up a dialog box from which a DXF file can be opened.  When a file is selected, the following window appears:


When a choice is made, the background is replaced.

    • Related Articles

    • Importing and Exporting GIS Files

      DRAINS provides transfers of system data and results to between GIS programs and DRAINS, reading from and creating ESRI (ArcView) shapefiles and Mapinfo MIF files, the most commonly-used GIS formats. This facility is not standard in DRAINS, but is ...
    • Exporting MapInfo files

      It is first necessary to establish a system that is capable of being run, such as the demo example shown below: Selecting the MapInfo files option from the File -> Export menu presents the following message: If you continue, you will then need to ...
    • Importing ESRI files

      This process enables you to import data into DRAINS from one to six sets of ESRI or ArcView files, plus an optional background from a DXF file. The procedure is pretty much the reverse of the exporting process for ESRI files. ArcView stores spatial ...
    • Importing ILSAX files

      The DRAINS procedure for converting the information in existing ILSAX files into DRAINS format is still available. However, it is not recommended as it creates DRAINS files in formats that are no longer current, particularly concerning the pit data ...
    • DXF and DWG files

      The drawing interchange format (DXF) file type, developed by AutoCAD, has been in use for many years and is accepted by almost all computer-aided drafting (CAD) systems. It is in ASCII format, and can be viewed on text editors. The DWG format is a ...