KB10649 - Configuring a PixelStore 2 image layer file to SQL databases.
The first step is to use Notepad or other text editor to manually create the TTKPS file to define the database connection:
[TatukGIS Layer]
Storage=PixelStore2
Layer=name_of_the_layer
Dialect=MSJET|MSSQL|INTERBASE|MYSQL|DB2|ORACLE|ADVANTAGE|SAPDB
ADO=ADO connection string, if the key does not exist then DBX connection will be used
ReadOnly=True|False
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=PixelStore2
Layer=Aerial
Dialect=MSSQL
ADO="DSN=MyPixelLayer"
The same methodology can be used to configure PixelStore 2 images to any supported SQL database product, e.g., DB2, Oracle, Interbase, MYSQL, etc.
The procedure described here applies to all TatukGIS products supporting the PixelStore 2 format, e.g., the DK, Editor, AIC, Internet Server, and free GIS Viewer.
Example 1
Creating a PixelStore file to SQLite (on the local computer) with the TatukGIS Editor
- Create a new SQL database file or determine which already existing database the PixelStore should be created to.
- Use Notepad to write a TXT file with the name mypixelstore.ttkps.
[TatukGIS Layer]
Storage= PixelStore2
Layer=ORTO
Dialect=SQLITE
Sqlite=pixelstore.sqlite
- Open the Editor and select "File/Export to Image". Upon export, select this newly created file mypixelstore.ttkps.
- Say YES to override the existing TTKPS file (data will be overwritten!!!)
Example 2
Creating a PixelStore file to Microsoft SQL Server with the TatukGIS Editor
- Create a new SQL database file or determine which already existing database the PixelStore should be created to.
- Use Notepad to write a TXT file with the name mypixelstore.ttkps.
[TatukGIS Layer]
Storage=PixelStore2
Layer=PixelStoreTest
Dialect=MSSQL
ADO=Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security ; ;Info=False;Initial
Catalog=YOURDATABASE;Data Source=YOURSERVER
- Open the Editor and select "File/Export to Image". Upon export, select this newly created file mypixelstore.ttkps.
- Say YES to override the existing TTKPS file (data will be overwritten!!!)
NOTE: TatukGIS has tested PixelStore with MS SQL Server versions 2000, 2000 MSDE, 2005 & 2005 Express. Version 2005 was tested with both the native and standard driver. Remember about the 4 GB database file size limitation with MSSQL Express edition.
Example 3
Creating a PixelStore file to MySQL Server with the TatukGIS Editor
- Create a database file and construct the ODBC DSN to this database.
- Create a text file, for example using notepad, with the content:
[TatukGIS Layer]
Storage=PixelStore2
Layer=MyTableName
Dialect=MYSQL
ADO="DSN=MyDsnName"
And name this "myfile.ttkps"
- At this point, the PixelStore file does not exist. So do not open the file.
- Open the Editor and select “File/Export To Image".
- Use the newly created myfile.ttkps as the target and indicate ‘Yes’ for overriding request confirmation.
- After the successful export, you will be able to open myfile.ttkps as usual.
Example 4
Creating a PixelStore file to Firebird SQL Server with the TatukGIS Editor
- Create a DATABASE_FILE.GDB file manually using firebird isql.exe tool or execute the script:
CREATE DATABASE 'DATABASE_FILE.GDB'
USER 'XXX' PASSWORD 'XXX'
PAGE_SIZE = 16384
DEFAULT CHARACTER SET MY_CHARSET;
- Create a text file, for example using Notepad, and add the following string:
[TatukGIS Layer]
Storage=PixelStore2
LAYER=ORTO
DIALECT=INTERBASE
DriverName=INTERBASE
GetDriverFunc=getSQLDriverINTERBASE
VendorLib=fbclient.DLL
LibraryName=dbexpint.dll
DATABASE=DATABASE_FILE.GDB
USER_NAME=XXX
PASSWORD=XXX
And name this "myfile.ttkps"
- Open the Editor and select “File/Export To Image".
- Use the newly created myfile.ttkps as the target and indicate ‘Yes’ for overriding request confirmation.
- After the successful export, you will be able to open myfile.ttkps as usual.
Example 5
Creating a PixelStore file to Oracle Server with the TatukGIS Editor
- Create a new SQL database file or determine which already existing database the PixelStore should be created to.
- Use Notepad to write a TXT file with the name mypixelstore.ttkps.
Ado:
[TatukGIS Layer]
Storage=PixelStore2
Layer=PixelStoreTest
Dialect=ORACLE
ADO= Provider=MSDASQL.1;Password=tiger;Persist Security Info=True;User ID=scott;Data Source=ORACLE
Dbx:
[TatukGIS Layer]
Storage=PixelStore2
LAYER= PixelStoreTest
DIALECT=ORACLE
drivername=Oracle
GetDriverFunc=getSQLDriverORA
LibraryName=dbxora.dll
VendorLib=oci.dll
DataBase=test-db:1521/SPATIAL
RowsetSize=200
BlobSize=-1
LocaleCode=0000
Oracle TransIsolation=ReadCommited
OS Authentication=False
Multiple Transaction=False
Trim Char=False
User_Name=SCOTT
Password=TIGER
ENGINEOPTIONS=1
- Open the Editor and select "File/Export to Image". Upon export, select this newly created file mypixelstore.ttkps.
- Say YES to override the existing TTKPS file (data will be overwritten!!!)
NOTE: For best performance we recommend using ODBC or Dbx drivers (instead of OleDB driver) because these drivers work faster with binary blob data.
Created: 2005-10-14, Modified: 2010-09-21