PostGIS is a great spatial extension for PostgreSQL server. This extension enables us to store spatial datasets directly to PostgreSQL database from various GIS software. On this article, I am going to show you how to work with PostGIS database on Mapinfo Professional. There are few things we need to prepare before we can use PostgreSQL database with Mapinfo Professional. In general, we need to prepare the following things:
- Install PostgreSQL and PostGIS on the server
- Configure PostgreSQL ODBC Driver on Windows 10
- Upload table from Mapinfo to PostGIS
- Open Table from PostGIS on Mapinfo Professional
Let’s start the tutorial.
A. Install PostgreSQL Server and PostGIS
Skip this step if you already have a working PostgreSQL Server setup on your network. Please read my previous post to install PostGIS on various operating systems.
B. Install PostgreSQL ODBC Driver on Windows 10
We need to install and configure the PostgreSQL ODBC driver on the computer where we install the Mapinfo Professional. In this case, I am using Windows 10. Download the PostgreSQL ODBC driver for Windows here (32 bit) or here (64 bit). If you need the different version, you can visit this page for the complete download list.
After install, go to Control Panel | Administrative Tools | ODBC Data Sources. We are going to create a new DSN. Click Add and then select PostgreSQL from the list
Enter the PostgreSQL server details here
Make sure the connection is working. Click Save and at this point our new DSN is ready.
C. Open PostGIS Table on Mapinfo Professional
Open Mapinfo Professional and then go to File | Open DBMS Connection. Watch the following animation to see how to open a PostGIS table on Mapinfo. I hope this picture can describe better than my writing.
C. Upload Table to PostGIS from Mapinfo
We can also upload Mapinfo Tables to PostGIS database directly from Mapinfo Professional. All you need is a tool called Easy Uploader. You can activate this tool via Tools | Tools Manager. Scroll down until you see Easy Uploader. Enable and auto load this tool.
With this tool, you can upload MapInfo tab files to a remote database that include Oracle, Microsoft SQL Server, PostGIS, and Microsoft Access.
That’s it. You have learned how to create a new PostGIS ODBC Connection, open PostGIS table and Upload Mapinfo Table to PostGIS. I hope this tutorial is useful and see you in the next tutorial.