Fast pyramid-based interpolation

EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Algorithm :: Related

Back to top


PYRINT is a fast-interpolation algorithm that fills holes in digital elevation models (DEMs) and imagery by using surrounding good-quality data pixels. The algorithm can also generate DEMs from raster-encoded points, break lines, and polygons.
Back to top


Name Type Caption Length Value range
FILI* String Input PCIDSK file name 1 - 192  
DBIC* Integer Input raster channel(s) 1 - 1  
FILO String Output-file name 0 - 192  
DBOC Integer Encoded raster channel 0 - 1  
SMOOTHIT Integer Number of smoothing iterations 0 - 2 Default: 2,4
BACKVAL* Float Background (fail) value 1 - 48  
NODATVAL Float NoData value 0 - 1  
CROSSNOD* String Interpolate across NoData 1 - 192  
FTYPE String Output file type 0 - 4 Default: PIX
FOPTIONS String Output file options 0 - 64  
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions


The path and file name of the GDB-supported input file that contains the raster image with holes to interpolate.


The input channel to read from the input file (FILI).

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.


The name of the file to which to write the interpolated data. If no value is specified, the output will be written to the same file specified for FILI. When writing to the same file, if the value of DBOC is the same as the DBIC, the channel will be overwritten with the output. If the file name specified does not currently exist, it will be created according to the value specified.


The output raster channel that receives the interpolated data.

If the output file specified for FILO exists, this parameter must be specified and the channel must exist. If the output file does not exist, the value of this parameter should be left unspecified or set to 1.


The number of smoothing iterations for each internal step. Higher values produce smoother interpolations. If a second value is specified, it is used for the final (full) resolution level. Values should range from 0 to 10. If no values are specified, default values of 2,4 are applied. With points that are spaced closely, such as LIDAR data, values of 0,1 may produce a better result.


The background (or fail) value, which indicates where holes exist. Pixels equal to the background value are replaced with interpolated values.


The NoData value. Pixels that equal the NoData value are ignored during interpolation. If no value is specified, the file metadata NO_DATA_VALUE is used (if it exists).

This parameter is optional.


The value you select specifies how interpolation treats the NoData values. To allow interpolation to cross over the NoData pixels, select Yes. To use the NoData pixels as a barrier, which the interpolation flows around, but not through, select No. With either selection, the NoData pixels are preserved in the final output.


The format of the output file (if specified for FILO). The default format is .pix.

For a complete list of GDB-supported file types, see GDB-supported file formats.

This parameter is optional.


The available options for the format of the output file (FTYPE), if applicable.

If the default format .pix is specified, the default value of FOPTIONS is BAND.

For a complete list of GDB-supported file types, including the available options for each, see GDB-supported file formats.


The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top


PYRINT is a fast-interpolation algorithm used to fill holes\u00e2\u20ac\u201dup to thousands of pixels across\u00e2\u20ac\u201din raster data. While it is effective especially with elevation data and imagery, it can also fill polygons (when the outlines have been burned into a raster image).

The input image is contained in the channel specified for DBIC in the input file specified for FILI. The output file (FILO) will be created with the same dimensions and projection as the input file (FILI) and the interpolated results will be put in channel one. The output file (FILO) cannot exist beforehand.

Holes in the imagery are indicated by pixels that have a value matching that specified for the BACKVAL parameter. In the interpolated output, pixels with a background (or fail) value (BACKVAL) are replaced with values interpolated from surrounding good-quality-data pixels.

If the imagery contains NoData values, this can be specified with the NODATVAL parameter. If no value is specified, the file metadata NO_DATA_VALUE is used (if it exists).

The value of CROSSNOD determines how interpolation treats NoData values. Selecting Yes allows interpolation to cross over the NoData pixels, while selecting No uses the NoData pixels as a barrier, which the interpolation can flow around, but not through. With either selection, the NoData pixels are preserved in the final output. The value specified for CROSSNOD applies only if a (NoData) value is specified for NODATVAL.

The interpolation process uses a pyramid approach and, as part of the process, smoothing is applied to remove artifacts. The value or values of SMOOTHIT determine the amount of smoothing to apply. The first value specifies the number of smoothing iterations to apply at various pyramid levels. The second value specifies the number to apply at the final level.

Higher values\u00e2\u20ac\u201dfor example, 5\u00e2\u20ac\u201dproduce very smooth results, but require more computation. If a value of 0 is specified, no smoothing is applied, but a "plating" effect will be evident, though this may be desirable for some types of interpolation, such as polygon fills with solid values. If no smoothing is specified, a default of two iterations per level and four on the final level is applied.

After running PYRINT, it is possible that some failed values may remain. Typically, these are failed pixels surrounded entirely by NoData values or when the imagery has to be processed in "chunks" due to the amount of data. This can usually be overcome by selecting Yes as the value of CROSSNOD.

Back to top


A file, demholes.pix, contains elevation (DEM) data, but a number of areas are missing data and indicated by "failed" pixel values of -500. Pixels outside the area of interest are indicated by NoData pixel values of -32768.

The goal is to fill in the missing (failed) pixels with data from surrounding good-quality DEM values. To obtain a smooth interpolation, two smoothing iterations are applied internally at each level, and three to the final level. Output is to the PCIDSK format file demfixed.pix, which has the same dimensions and projection as the input file, demholes.pix.

EASI>FILI        =   "demholes.pix"
EASI>DBIC        =   1
EASI>FILO        =   "demfixed.pix"
EASI>DBOC        =   1
EASI>SMOOTHIT    =   2,3
EASI>BACKVAL     =   -500
EASI>NODATVAL    =   -32768
EASI>CROSSNOD    =   "yes"
EASI>FTYPE       =   "PIX"


The output file, demfixed.pix, contains the interpolated DEM, in channel 1, with holes removed.

Back to top


The PYRINT algorithm is proprietary to PCI Geomatics. It uses pyramid levels to produce interpolation, is extremely fast, and highly parallelized. PYRINT is optimized for filling in holes\u00e2\u20ac\u201deven very large ones\u00e2\u20ac\u201din imagery and DEMs. It can also be used to interpolate between any mix of points, break lines, and polygons.

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