DBCreate()

  DBCreate

Description

DBCreate() is used to create a GDB supported database.

Call Signature

int DBCreate ( string filename, string file_type, int pixels, int lines, int channels, string data_type [, string options ] )

Return Value

int

0 is returned if the file create fails; otherwise, a file handle on a database with write access will be returned.

Arguments

string filename:

Name of file to create.

string file_type:

Three character file type code, such as "PIX" for PCIDSK, and "TIF" for TIFF.

int pixels:

Width of database in pixels.

int lines:

Length of database in scanlines.

int channels:

Number of image channels in the database.

string data_type:

Type of the image channels. One of "8U", "16U", "16S" or "32R"

[ string options ]:

If this argument is present, this specifies additional creation options. For Example, "LZW" can used to specify compression for the TIFF format.

Remarks

The DBClose() function should be used to close this file. All DBxxxx() functions are usable with this file.

Note: It is not possible to create the full range of possible PCIDSK files with this function. In particular, it is not possible to create files with mixed data types, nor is it possible to create files with FILE interleaved channels.

The set of legal types for the "file_type" and "options" flags are maintained using FEXPORT.

See also

GDB file functions

DBClose()

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.