Pitney Bowes MapInfo Professional User Manual

Page 180

Advertising
background image

If you want to convert your table to the MapInfo Professional native .TAB format to work with it, then use
EasyLoader, which will also rename your geometry or point columns and add a spatial primary key
column to the table.

Adding a Spatial Primary Key Manually

To have full control over renaming geometry or point columns and add a spatial primary key column to
one or more tables, you can do this manually. If you choose to update your tables yourself, then you
must make the following changes:

Geometry Data Tables

If you are working with a spatial table containing geometry (such as regions), the geometry column must
be named SP_GEOMETRY. The following table is a summary of what is required for geometry data
tables (note that Microsoft Access does not support geometry data, only point data):

Geometry Column Name

Primary Key Column

DBMS or Data Source

SP_GEOMETRY

MI_PRINX

Oracle, PostGIS, SQL Server
Spatial

• If working with a database table, then MapInfo Professional finds the correct primary index column

(this column must be a numeric type).

• If working with a database view, then it must have a column named MI_PRINX that is unique and

numeric.

X,Y Point Data Tables

If you are working with a spatial table containing X,Y data (such as Latitude and Longitude), the X and
Y columns must be named MI_SQL_X and MI_SQL_Y. The table must also have a unique primary key
column that is indexed and named MI_SQL_REC_NUM.

Y Column Name

X Column Name

Primary Key Column

DBMS or Data Source

MI_SQL_Y

MI_SQL_X

MI_SQL_REC_NUM

Access, Oracle,
PostGIS, SQL Server
Spatial, SQL Server with
SpatialWare

To use different names for these columns, specify the name of the X, Y and spatial object columns in
the MapCatalog.

SQL Server with SpatialWare Tables

If you are working with SQL Server with SpatialWare installed, the column naming convention is different
from other spatial DBMS tables. You must use SW_MEMBER for the unique primary key column that
is indexed, and SW_GEOMETRY for the geometry column.

Geometry Column Name

Primary Key Column

DBMS or Data Source

SW_GEOMETRY

SW_MEMBER

SQL Server with SpatialWare

If your table contains X,Y data, then the column names must be MI_SQL_X and MI_SQL_Y.

MapInfo Professional 12.5

180

Adding a Spatial Primary Key to a DBMS Table

Advertising