Our main GIS software is ArcGIS, but we work with other organizations who use MapInfo, and we occasionally receive data from them in MapInfo format, or they ask us to supply data in MapInfo format, for example at the Census Dissemination Unit.
We usually use the MapInfo Universal Translator tool to convert from MapInfo formats to Shapefiles, and vice versa. However, the Universal Translator comes only as part of the MapInfo Professional software, and it is somewhat overkill to pay for MapInfo Professional if we only use one function. So let’s see if there are other (maybe free) tools to convert MapInfo files to Shapefiles and vice versa.
MapInfo has two file types:
- MapInfo data files. These are the files that you directly work with in MapInfo. A dataset consists of multiple files and comprises at least a *.TAB and *.DAT file, but usually a *.TAB, *.DAT, *.MAP and *.ID file. This format is also called the MapInfo TAB format.
- Alternatively MapInfo data can come in MapInfo Interchange Format. This is data that has been explicitly exported in MapInfo. Data in this format comes as a single *.MIF file (containing the data), or as as set of a *.MIF and a *.MID file (the first containing the data, the second symbology). This format is also called the MapInfo MIF format.
On the ArcGIS side we will be happy to use Shapefiles – we can easily convert them to/from Geodatabases if required.
So the scenarios are:
- MapInfo TAB file >> Shapefile
- MapInfo MIF file >> Shapefile
- Shapefile >> MapInfo MIF file
I suspect there is a software that can handle all of these… of course it is QGIS! But there are also various other methods, see below.
QGIS to the rescue
- Start QGIS
- Load your source file: Go to Layer > Add Vector Layer. Browse for your input file (TAB or MIF or Shapefile). Select the input file and load it into QGIS:
- QGIS automatically reads TAB, MIF and Shapefiles, so it should display immediately, and be listed in the Table of contents.
- In the Table of Contents right-click the file name and select Save As. Specify an output format (ESRI Shapefile or MapInfo file).
- Click Browse to specify an output filename.
- For Shapefile to MapInfo conversion: You can specify a file extension (.TAB or .MIF) to get the respective format. If you don’t specify the extension, QGIS will save files automatically in MIF/MID format (MapInfo Interchange Format).
- Click OK. Done!
In case you can not or do not want to use QGIS, for example if you work in a restricted environment and cannot install software, there are alternatives:
Alternative 1: Shapefile to MapInfo TAB and vice versa
OGR2GUI is a easy to use, free tool to convert between Shapefile and MapInfo TAB format (and between various other formats). The download comes as a ZIP file. Extract it and and run the ogr2gui.exe program. Everything else is self explanatory.
Alternative 2: MapInfo MIF to Shapefile with ArcGIS
ArcGIS includes a little known converter for MapInfo MIF files. It is a command line tool called avmifshp.exe, and it is installed in your ArcGIS binaries directory, e.g. C:\Program Files (x86)\ArcGIS\Desktop10.2\Bin
The syntax for this converter is:
avmifshp.exe MIFSHAPE [LINE/POINT/POLY/TEXT] [mif_file] [shape_file]
Note that you must not specify the extensions for the input and output files (.MIF and .SHP, respectively) !
You have a MapInfo MIF dataset C:\Temp\Boundary_MI.MIF (optionally accompanied by C:\Temp\Boundary_MI.MID). This dataset contains polygon features. To convert this to a Shapefile:
- Open a command prompt (on Windows 7: Start > All Programs > Accessories > Command Prompt)
- In the black Command Prompt window type:
“C:\Program Files (x86)\ArcGIS\Desktop10.2\Bin\avmifshp.exe” poly “C:\Temp\Boundary_MI” “C:\Temp\Boundary_Arc”
- Hit Enter
This process does not create metadata for the output file, so you have to manually specify the coordinate system: Find out what the coordinate system of the MapInfo file was, then open ArcCatalog, navigate to the output file C:\Temp\Boundary_Arc, right-click it > Properties > XY Coordinate System, and select the same coordinate system that the input MapInfo file had.
A note on ogr2ogr
ogr2ogr is a very powerful open source library to convert data between many GIS vector file formats. For rasters there is an equivalent called GDAL. These are libraries for software developers, so they are not not useful if you simply want to convert a file.
However, ogr2ogr and GDAL are included in most open source GIS software products – for example both QGIS and OGR2GUI internally use them for file format conversion.
There is no stand-alone compiled version of ogr2ogr and GDAL, but you can for example install FWTools, a collection of open source GIS tools that includes ogr2ogr and GDAL. After installation you will have a file C:\Program Files (x86)\FWTools2.4.7\bin\ogr2ogr.exe. Simply run it from the command line to convert your GIS data. For usage notes see here.