| Environments | PYTHON :: EASI |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
| Back to top |
| Back to top |
cim(file, tex1, tex2, dbsz, pxsz, dbnc, dblayout)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | str | Input file name | 1 - | |
| TEX1 | str | Descriptive text 1 | 0 - 64 | |
| TEX2 | str | Descriptive text 2 | 0 - 64 | |
| DBSZ * | List[int] | Database size (pixels, lines) | 2 - 2 | 1 - |
| PXSZ | List[float] | Pixel ground-size (m) | 0 - 2 | 1 - Default: 1,1 |
| DBNC * | List[int] | Number of channels (8U,16S,16U,32R,C16S,C32R) | 1 - 6 | 0 - |
| DBLAYOUT | str | Data Layout | 0 - | See parameter description Default: BAND |
| Back to top |
FILE
The name of the PCIDSK file .pix to create. The file name you specify must not exist already.
TEX1
A description, up to 64 characters, of the contents or origins of the PCIDSK file to create.
TEX2
If necessary, a continuation of the description of TEX1 of up to 64 characters.
DBSZ
The database image size, in pixels and lines. You must specify a value for this parameter, even if the number of output channels (DBNC) is zero.
PXSZ
The horizontal (x-size) and vertical size (y-size) of one pixel, in meters. The pixel size is stored in the header of the image database file.
The PXSZ parameter is also used by some algorithms for area and perimeter calculations in reports. Specifying a meaningful size is important for ground-area calculations in a classification that is reported by the MLR algorithm.
The PXSZ parameter does not affect the pixel size in the georeference segment, which remains as 1,1 until a bounds is specified for the image database.
DBNC
The number of image channels of each type to create in the new PCIDSK file. If this value is set to zero only, the file can contain only segment data.
For example:
DBNC = 6, 0, 0, 3, 0, 1
DBLAYOUT
The layout of the image data in the new PCIDSK file.
See parameter description
| Back to top |
CIM creates a new PCIDSK image file with the file name you specified for the FILE parameter.
Disk space is allocated for a specified number of 8-bit unsigned, 16-bit signed, 16-bit unsigned, 32-bit real, complex 16-bit signed, and complex 32-bit real image channels (DBNC), in either pixel-interleaved or band-interleaved mode (DBLAYOUT). The total number of channels cannot exceed 4,096.
Creating a database file with no channels (DBNC=0) implies that it is used only for storing segment data.
All image channels have the same number of pixels for each line, and lines for each image (DBSZ). A database file can have up to 99,999,999 pixels for each line (DBSZ(1)) and 99,999,999 lines for each image (DBSZ(2)). You must specify a value for the DBSZ parameter, even if no image channel is in the file (DBNC=0). The value of the DBSZ parameter determines the size of the bitmap segment, which can be added to the file later.
A database file can store a maximum of 1,024 segments of any type. The first segment is always a georeferencing segment (type 150) that contains the default identity transformation.
CIM does not write (or clear) any data to the database channels. Initially, all database channels contain undetermined values; these may be overwritten by CLR or another algorithm.
Descriptive text (TEX1,TEX2) that applies to the image is written to the database file.
The horizontal and vertical dimensions, in meters, of a single pixel (PXSZ) can be used by other algorithms to calculate the area covered by a specified part of the image. The default pixel size is 1 x 1 meters. The database pixel size may be modified by the APS algorithm (if the database is not georeferenced) or by the GEOSET algorithm (if the database is georeferenced).
The layout of image information (DBLAYOUT) on a disk can be PIXEL (for pixel interleaving), BAND (for band interleaving), FILE (for file interleaved), or TILED.
The layout selection is based primarily on performance. Band interleaved stores the data together for one band and provides a better performance when bands are not all being accessed at all times. Pixel interleaved stores the data for all bands together at a particular pixel and may provide improved performance when all bands are used at once. File interleaved is similar to band interleaved, but the image-channel data is stored in external files (one file for each band).
Tiled files organize the image in several square sub-images, which may be much faster to access when only a sub-area is being extracted, as in file viewing. Tiling is also the only format that supports compression formats, with a default of no compression. JPEG compression is a lossy compression and is normally suitable for continuous images, such as airphotos. Run Length Encoding (RLE) compression is lossless, but provides compression good only for images in which long sequences of pixels have the same value, which is typical in pseudocolored or thematic images.
| Back to top |
Create a PCIDSK file named demo.pix with six 8-bit channels and three 32-bit real channels (no 16-bit signed, 16-bit unsigned, complex 16-bit signed or complex 32-bit real channels), each 512 pixels by 512 lines, pixel-interleaved, and with a ground pixel size of 30 x 30 meters.
from pci.cim import cim file = "demo.pix" # file name tex1 = "Demo Image" # descriptive text tex2 = "" dbsz = [512,512] # 512 pixels by 512 lines pxsz = [30,30] # 30 x 30 meter resolution dbnc = [6,0,0,3] # six 8-bit and three 32-bit channels dblayout = "PIXEL" # use pixel interleaving cim(file, tex1, tex2, dbsz, pxsz, dbnc, dblayout)
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.