How to Export MapInfo Table to PostGIS

Hello everyone, welcome to GIS Tutorial website, a website that provides free GIS tips and tutorials for beginners. In this article, we are going to learn how to export Mapinfo Table to PostGIS. As you know, PostGIS is a powerful spatial database extension for PostgreSQL Server. This will be a quite long article since we are going to discuss about several ways to export Mapinfo table to PostGIS.

There are several ways to export Mapinfo Table to PostGIS. And I will try to cover them all here and explain one by one. So first, let’s prepare our Mapinfo table for this purpose. You can use any of your data. Please refers to the following article to know how to create Mapinfo table/file from a CSV file. You will need one of the following software in order to export table to PostGIS:

  • Global Mapper
  • QGIS
  • ogr2ogr tool
  • FME Translator
  • Mapinfo Professional

As you can see, actually we can use Mapinfo Professional to export the table to the PostGIS database. Let’s jump into the first one.

A. Export Mapinfo Table to PostGIS using Global Mapper

Before we can export the table to PostGIS using Global Mapper, we need to create a new connection. Please visit the official Global Mapper website to obtain the trial license if you need one. We do not provide the download link for any Global Mapper full version, serial number or crack.

Steps to Create a new PostGIS Connection on Global Mapper

  1. Open Global Mapper
  2. Go to Tools | Connection Manager
  3. Click New
  4. Select “PostGIS Spatial Database”
  5. Give a new connection name
  6. Enter the PostGIS server address and login credentials
  7. Click Test Connection and then press OK

So now we have created a new PostGIS connection. We can then start to export the Mapinfo table to PostGIS.

  1. Open the Mapinfo Table to Global Mapper
  2. Go to File | Export | Export Vector Spatial Database
  3. Click Select Spatial Database Connection (ArcSDE, PostGIS, etc)
  4. Choose the PostGIS connection we created earlier from the list
  5. Enter the username and password for the PostGIS
  6. Click Open
  7. Specify the destination table name and enable some options if you like.
  8. Click OK

The export process will begin. That’s it now you have completed the steps to export Mapinfo table to PostGIS using Global Mapper.

B. Export Mapinfo Table to PostGIS using QGIS

QGIS is a free GIS Software that has many capabilities. We can use QGIS to export Mapinfo table to PostGIS in few simple steps. Before we go further, we need to create a new PostGIS Connection on QGIS.

  • Open QGIS
  • Right-click on the PostGIS located on the left browser panel and click New Connection
  • Give our new connection a name
  • Enter the PostGIS server/database credentials
  • Click OK

After we created a new PostGIS connection, we are ready to export the layer to PostGIS. To export the layer to PostGIS from QGIS, follow these steps:

  1. Go to Database >> DB Manager
  2. Expand the PostGIS database on the left panel
  3. Click Import File
  4. Specify the Mapinfo table you wan to export
  5. Specify the destination table name and some other options

Optionally, you can also use the Export to PostgreSQL feature from the Toolbox panel. It’s pretty similar to the above method. You will need to select the layer, database connection, schema and table name.

C. Export Mapinfo table to PostGIS using ogr2ogr Tool

In this section, you will learn how to export Mapinfo Table to PostGIS using free tool called ogr2ogr Please visit this website to find out how to download and install ogr2ogr on your system. Ogr2ogr is a command line tool that supports various dataset such as Shapefile, Mapinfo, PostGIS, MySQL and many more.

ogr2ogr -f "PostgreSQL" PG:"host=localhost user=postgres dbname=gis_database password=12345" EB_collar.tab

The command above will export a Mapinfo table called: EB_collar.tab to my PostGIS server at localhost. This method works very well on my case. ogr2ogr is a great tool for GIS data conversion purposes. With a little efforts, we can convert Mapinfo Table to PostGIS using ogr2ogr.

D. Export Mapinfo Table to PostGIS using Easy Loader in Mapinfo Professional

Mapinfo Professional has a built in tool called Easy Loader that can be used to export Mapinfo Table to PostGIS database. Follow these steps to use Easy Loader to export Mapinfo Table to PostGIS

  1. Open Mapinfo Professional
  2. Open Easy Loader by going to Tools >> Easy Loader. You may need to enable Easy Loader first via Tools >> Tools Manager.
  3. From the Easy Loader window, click ODBC and then select the PostgreSQL ODBC Connection. If you don’t have it, you can create a new one. Please follow this step to create a new PostgreSQL ODBC Connection in Windows 10.
  4. Click Source Table and browse the Mapinfo table you want to export.
  5. Give a name for the server table name
  6. Click Upload

Thank you for reading this article and see you on the next tutorials.