Search for: KB10649 - Connecting to a PixelStore image SQL database layer. The TatukGIS Developer Kernel and desktop GIS Editor products support reading and writing the TatukGIS PixelStore (v. 2) SQL layer format for efficient storage of even huge image and raster grid layers in just about any database product. The free GIS Viewer contains read-only support. Further to the information contained in this knowledge base item, detailed and more frequently updated information about TatukGIS support for PixelStore layers is found in the Developer Kernel product documentation web site: http://docs.tatukgis.com/DK11 This knowledge base item explains how to manually configure the connection to a PixelStore SQL layer, though the same can be done more easily using the Editor's SQL connection Wizard. For more about the SQL connection Wizard feature, refer to the help topic information for the Editor Layer/Add SQL Layer menu. Also refer to the on-line Editor/Viewer tutorials, one of which demonstrates connecting to PixelStore and other SQL layer types. With manual configuration, the first step is to use Notepad or other text editor to 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|POSTGRESQL|SQLITE 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 layers to any supported SQL database product. Refer to knowledge base item KB10639 for a list of PixelStore compatible database engines. 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 the already existing database the PixelStore is 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: If using PixelStore with MSSQL Express, remember about the 4 GB database file size limitation. 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 the already existing database the PixelStore is 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: October 14, 2005, Modified: February 13, 2017