Happy #MapInfoMonday!
We have now created a connection to our spatial database and we have added the MapInfo_MapCatalog to the database too. Now we can start adding tables to the Map Catalog so that we can use these tables in MapInfo Pro.
There are a couple of ways to get tables added to the Map Catalog. Let me start by stating that you don't need to add all tables to the Map Catalog. Tables with only attribute data and no spatial data don't have to be added to the Map Catalog to be opened in MapInfo Pro. You only need to add the tables that you want to use in MapInfo Pro and that hold a spatial component.
You can add tables manually to the Map Catalog or through a script. This is a bit tricky as you need to ensure the values are right. This can be done and could be useful if you create new tables in the database using a batch process for example.
A table will automatically get added to the Map Catalog with the correct attributes if you upload it to the database through a MapInfo tool, such as MapInfo Pro or MapInfo EasyLoader. We will cover this in a later article.
If you already have tables with a spatial component in the database, you can use Make DBMS Table Mappable to add it to the Map Catalog. Let's dive a bit into this part.
From the Database dropdown on the Table tab, click on Make DBMS Table Mappable.
The Select Data Source dialog will now prompt you to select a Data Source to connect to the specific database. I'll select the data source we created earlier which connects us to the PostgreSQL/PostGIS database.
If you already have a connection open, you will not be prompted to select the data source, MapInfo Pro will use the existing DBMS connection.
If you have multiple DBMS connections open, you can right-click on the one you want to use from the Connections list in the Explorer Window, and from here select Make DBMS Table Mappable. As you can see you can work with your open DBMS connections directly from the Explorer Window.
When you add a table to the Map Catalog, it will get stored with several values telling MapInfo Pro how to open and render the objects.
Here is the addresses
table record, I just added to the Map Catalog. We will not go into detail with these values in this article but this gives you an idea of the values being stored in the Map Catalog when you make a table mappable.
------------------------------
Peter Horsbøll Møller
Principal Presales Consultant | Distinguished Engineer
Precisely | Trust in Data
------------------------------