KB10812 - How do I connect a TatukGIS product to a MapInfo SpatialWare layer? What is supported?
The TatukGIS DK product (DK Enterprise 9.0 and later versions of the VCL, ActiveX, and .NET editions), TatukGIS Internet Server product (9.0 and later versions), and GIS Editor product (2.0 and later versions) support (reading/writing) the MapInfo (Pitney Bowes) SpatialWare database vector layer format and its spatial indexes.
A MapInfo SpatialWare layer can be opened by opening a *.TTKLS file with the name_of_layer.ttkls or, without the use of a *.TTKLS file, by i) embedding all the *.ttkls file parameters into the Path property as a CRLF or '\n' delimited sting (as a new line) or ii) assigning the *.ttkls file parameters to the SQLParameters property using SQLParameters[‘KEY’] = VALUE.
TTKLS is a TatukGIS stub file that contains the connection settings to any given SQL vector map layer. A TTKLS file can be created i) manually using any text editor (such as Note Pad) or ii) using the SQL connection Wizard feature in the Editor product (refer to menu item: Layer/Add SQL Layer).
The structure of the *.ttkls file for a SpatialWare layer must be:
[TatukGIS Layer]
Storage=SpatialWare
Layer=name|name;schema
Dialect=MSJET|MSSQL
ReadOnly=True|False
ADO=ADO connection string; if does not exist, then DBX connection will be used
LoginPrompt=1|0
DriverName=see DBExpress help for TSQL Connection
GetDriverFunc=see DBExpress help for TSQL Connection
VendorLib=see DBExpress help for TSQL Connection
LibraryName=see DBExpress help for TSQL Connection
...
Parameters key=value
...
For example:
[TatukGIS Layer]
Storage=SpatialWare
Layer=Rivers
Dialect=MSJET
ADO="DSN=MyVectorLayer"
This layer can also be opened by providing the SQLParameters property. OnPassword event will be fired upon connecting to the database to resolve <#user#>, <#password#> or any other <#token#> embedded into the connection options. Better is to use uppercase layer naming (in a meaning of Layer=xxxx) because, depending on the database engine, the layer name can be case sensitive.
The implementation of MapInfo SpatialWare for MS SQL Server requires SpatialWare installation on any Microsoft SQL Server instance.
The support takes advantage of the SpatialWare spatial indexes for fast spatial queries. If you want to create a MapInfo SpatialWare layer on the Microsoft SQL Server database engine, or import data to an existing SpatialWare layer on MSSQL Server, ensure that the database and all its objects are owned by dbo. All operations that create database objects must be done with a user account having administrative privileges for the database, i.e., membership in the sysadmin role eg. sa user. MSSQL Server objects have owners and users. All access is controlled by ownership and the use of permissions. It is also necessary to login with sysadmin role during import when the SpatialWare set-up allows multiple users (with varying permissions) access to the database.
For checking DE9-IM coincidence between geometry objects, take into consideration the GeometryRelationships setting. You may decrease the amount of returned rows from the server with the setting GeometryRelationships=Server or analyze the geometry relation on the application side with the setting GeometryRelationships=Client.
Created: 2009-07-09, Modified: 2009-11-16