ThemeSpatial Data Warehouse
Type

MapInfo

Available from 




System CategoryGIS
Source

Astun Spatial Data Warehouse

Available since
Organisation




Target releasev1.0
Epic
Document status
Document owner
Designer
Developers
QA


A brief guide to the iShare Spatial Data Warehouse

The iShare Spatial Data Warehouse (SDW) is a database provided by PostgreSQL/PostGIS. Within a SDW there will be various schemas that relate to business functions within an organisation such as 'environmental health' or 'planning'. Within each schema spatial data is held, access to which is controlled by the GIS Administration team of the organisation. They will create user accounts for each user and assign them permissions to read and write to the schemas as appropriate. All tables in each schema have the same security controls.

An end user will be provided with the connection details that are required to connect to the SDW. They will also notify each end user of the schemas that they have read and write access to. 

All users have the right to create new tables in the staging schema. By default any tables that a user creates in the staging schema will not be accessible to other users unless the GIS Administration team have set it to be so. Consider the staging schema a private area where data can be created before it is considered ready for corporate consumption. Once ready the GIS Administration team will move the table to a business schema and it will adopt the permissions of the schema that it resides within.

Install MapInfo Professional 

Install MapInfo Professional on the local machine. This can either be the MapInfo Professional 64-bit version or the 32-bit version (as shown below).

Download and Install PostgreSQL ODBC driver

Download the Windows PostgreSQL ODBC drivers from www.postgresql.org or click the Download link below that applies to your version of MapInfo.

Download links:  

64-bit download psqlodbc_09_06_0400-x64.zip 

32-bit download psqlodbc_09_00_0310.zip.

MapInfo Professional v12.0 is a 32-Bit application and as such cannot access 64-bit ODBC drivers. If you try this you will get an 'architecture mismatch' error message in MapInfo Professional similar to the following

Create an ODBC connection

MapInfo 64-bitMapInfo 32-bit
Use the application Search to look for ODBC Data Sources and select the 64-bit result.

From the windows desktop go to Start -> Run (or Win+R to open the Run dialog)

Enter the following command to open the 32-bit ODBC Administrator

C:\Windows\SysWOW64\odbcad32.exe

Select the System DSN tab and click Add...

Select the System DSN tab and click Add...

Select the PostgreSQL ANSI driver and click Finish.

Select the PostgreSQL ANSI driver and click Finish.

Enter the details of the PostgreSQL database you wish to connect to and click Test.

Enter the details of the PostgreSQL database you wish to connect to and click Test.


MapInfo Professional documentation recommends setting the Datasource option "Use Declare/Fetch" for each connection to improve performance.

Click on the Datasource button to display the Advanced Options dialog, check "Declare/Fetch" and click OK


Click Save.Click Save.

Example of opening an PostGIS layer in MapInfo

The user has experience with MapInfo Professional, PostGIS, ODBC configuration and relevant Administrator rights on the client PC


MapInfo 64-bitMapInfo 32-bit

From the Open menu select Database Table.

From the MapInfo menu go to File -> Open DBMS Connection

Select ODBC and click New...

Select ODBC and click New...

Click on the Machine Data Source tab and select the correct connection for your database and click OK.

Click on the Machine Data Source tab and select the correct connection for your database and click OK.

Now you have a connection to the database you can Open various tables that have been loaded.

  • Select the tables you wish to open.
  • Click OK.

Now you have a connection to the database you can Open various tables that have been loaded.

  • Select the Data Source Name and click OK.
  • Either use the DBMS toolbar and select the Open DBMS Table option.

  • or use File Open (Ctrl+O)

  • From the Files of type drop down select your database connection.

  • Now you can select the tables you wish to open and click OK.

Example of creating a PostGIS layer in MapInfo


In the Field Information at the bottom of the dialog add ogc_fid as the Name and select the Type of Integer and click the Add Field button. Now check the Indexed box to add this as an index field. Add any other attribute fields that are necessary.Click the Projection... button.

MapInfo 64-bitMapInfo 32-bit

Select New Table from the TABLE ribbon.

Select New Table from the File menu.

Check the Open New Mapper box and select the Create New radio button to create a new table structure.

Click Create...

Check the Open New Mapper box and select the Create New radio button to create a new table structure.

Click Create...

In the Field Information at the bottom of the dialog add ogc_fid as the Name and select the Type of Integer and click the Add Field button. Now check the Indexed box to add this as an index field. Add any other attribute fields that are necessary.

Click the Projection... button.

In the Field Information at the bottom of the dialog add ogc_fid as the Name and select the Type of Integer and click the Add Field button. Now check the Indexed box to add this as an index field. Add any other attribute fields that are necessary.

Click the Projection... button.

Select the Category British Coordinate Systems and then click the British National Grid [EPSG: 2700] Category Member and click OK.

Select the Category British Coordinate Systems and then click the British National Grid [EPSG: 2700] Category Member and click OK.
Click Create.Click Create.

In the Create New Table dialog select Save As Type and choose the ODBC connection to the Spatial Data Warehouse, select the staging schema and provide a suitable name for the table.

In the Create New Table dialog select Save As Type and choose the ODBC connection to the Spatial Data Warehouse, select the staging schema and provide a suitable name for the table.

n the New DBMS Table Options dialog under the General tab select ogc_fid as the Primary Key column.

Click on the Spatial tab.

Select PostGIS as the Index Type and sp_geometry as the Index Column.

Click OK and the new table will be created.

MapInfo will notify you that the table has already been added to the Map Catalog. You can ignore this message.

n the New DBMS Table Options dialog under the General tab select ogc_fid as the Primary Key column.

Click on the Spatial tab.

Select PostGIS as the Index Type and wkb_geometry as the Index Column.

Click OK and the new table will be created.

MapInfo will notify you that the table has already been added to the Map Catalog. You can ignore this message.

Modifying MapInfo Workspaces to point to PostGIS layers

Users that are transitioning to iShare SDW will naturally have tab files either holding local data or referencing data held in other DBMSs. One can either edit the workspace .wor file in a text editor to point to a new PostGIS tab file or overwrite the existing tab file with a PostGIS tab file.

Data considerations

The following considerations apply when editing data stored in PostgreSQL within MapInfo Professional.