| Environments | PYTHON :: EASI |
| Quick links | Description :: Parameters :: Parameter descriptions :: Return Value :: Details :: Example :: Related |
| Back to top |
| Back to top |
superapply(fili, dbic, filoff, dbdc, filo, dboc, chresamp)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILI * | str | Database File Name | 1 - | |
| DBIC | List[int] | Database Input Channel List | 0 - | |
| FILOFF * | str | Input offset file name | 1 - | |
| DBDC * | List[int] | Difference/Offset Channel List | 2 - 2 | |
| FILO * | str | Database Output File Name | 1 - | |
| DBOC | List[int] | Database Output Channel List | 0 - | |
| CHRESAMP | str | Channel resampling method | 0 - | Default: C |
| Back to top |
FILI
This parameter specifies the name of the input file to be resampled. This file can be in any GDB-supported format.DBIC
This parameter represents the list of channels in the input file to be resampled using the offset information. If defaulted, all channels in FILI are processed in the order occurring in the file.
The channels may be repeated. For example, DBIC=1,1,1 and CHRESAMP="NBC" resamples the first FILI channel into three FILO channels, with the nearest neighbor, bilinear and cubic resampling methods, respectively (see below for the description of the CHRESAMP parameter). With DBIC=3,2,1 the order of the channels is reversed in the output file.
Only 8U, 16S, 16U and 32R channels are supported at present.
FILOFF
This parameter specifies the name of the file containing the offsets. The file is in the desired output projection but can be a different resolution.DBDC
This parameter specifies the list of offset channels to use to resample input channels in DBIC. The number of entries in DBDC must be either two, or exactly twice the number of channels specified in DBIC. If only two channels are specified in DBDC, the same offsets are used to resample all channels in DBIC. If the number of channels in DBDC is twice the number of entries in DBIC, the consecutive pairs of channels in DBDC are used to resample the consecutive individual channels in DBIC.
Each pair of channels in DBDC specifies the shifts in X (pixel) and Y (line) directions to the position in the input image corresponding to the center of the current pixel in the output image. The shifts are used to position the resampling window in the input image to extract the value that is to be copied to the output image.
FILO
This parameter specifies the file name to be given to the resampled image. The resampled pixels will be shifted from their input positions by the amounts specified in the corresponding difference/offset channels.DBOC
This parameter represents the list of channels in the output file to put each corresponding input channel in DBIC.
If the output file does not exist, this parameter must be empty. If the output file exists, this parameter must be specified along with DBIC.
Each output channel must have the same data type as the corresponding input channel.
CHRESAMP
Specifies the resampling method to use. Only the Cubic Convolution (C), Bilinear (B) and Nearest Neighbor (N) methods are supported, and cubic convolution (C) is the default method. Cubic convolution resampling is recommended for imagery channels; bilinear resampling is for the data that should retain the range of their values, such as elevation channels; nearest neighbor resampling is typically used for thematic or categorical channels, such as data quality indices or correlation scores.
The resampling method is specified by a single character, in either upper or lower case: C for Cubic Convolution, B for Bilinear and N for Nearest Neighbor. If only one character is provided, it applies to all channels specified in the DBIC parameter. Otherwise the number of characters must be exactly the same as the number of channels in DBIC (provided explicitly or implicitly), and consecutive characters apply to the consecutive input channels. For example, if DBIC=1,2 and CHRESAMP="CN", the first input channel is resampled using the cubic convolution kernel, while the second channel uses the nearest neighbor resampling. If DBIC=1,2,3 is for stereo DEMs, then CHRESAMP="BCN" resamples elevations in channel 1 using bilinear resampler, image in channel 2 using cubic convolution, and scores in channel 3 using nearest neighbor resampling.
| Back to top |
Returns: A list of statistical values.
Type: PCI_DOUBLE
Parameter: IMSTAT
| Back to top |
| Back to top |
Resample channels 4, 5, 6 to channels 3, 2, 1 of the output file, using cubic convolution for input channels 5 and 6, and the nearest neighbor resampling for input channel 4. All files are in the current working directory.
from pci.superapply import superapply
fili = 'Raw_Image.pix'
dbic = [6, 5, 4]
filoff = 'Offsets.pix'
dbdc = [1, 2]
filo = 'Resampled_Image.pix'
dboc = []
chresamp = 'CCN'
superapply ( fili, dbic, filoff, dbdc, filo, dboc, chresamp )
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.