STAMPJOIN

Overlay two raster channels to one raster channel


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

Back to top

Description


Overlays two raster or thematic raster channels to generate an output raster which is a combination of the two input channels.
Back to top

Parameters


stampjoin(fili, filo, dbic, dbib, dboc, methods)

Name Type Caption Length Value range
FILI * str Input file name 1 -    
FILO str Output file name 0 -    
DBIC * List[int] Input raster channels 2 - 2  
DBIB List[int] Area mask 0 - 1  
DBOC List[int] Output raster channel 0 - 1  
METHODS str Method used to generate raster 0 - 5 STAMP | JOIN
Default: JOIN

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the PCIDSK file that contains the raster image channels to overlay, and the optional bitmap mask segment.

FILO

Specifies the name of the PCIDSK image file to receive the output raster channel. If this parameter is not specified, it is assumed to be the same as FILI. If FILO exists, its projection must be the same as FILI.

If the specified output file does not already exist, a new PCIDSK file is created. By default, the projection information from FILI is copied to the new FILO.

DBIC

Specifies the input channels that contain the input raster or thematic raster image.

DBIB

Specifies the bitmap segment that defines the area from which to sample data from the input channels.

If this parameter is not specified, the entire channel is processed by default.

DBOC

Specifies the output channel to receive the generated raster image combination of the two input channels.

If the specified output file does not exist, a new output channel is automatically created, and this parameter is ignored.

If the specified output file already exists, this parameter must be specified. The specified output channel cannot be the same as the input channel.

METHODS

Specifies the method used to generate the output raster channel.

Available options are:
Back to top

Details

STAMPJOIN overlays two input raster or thematic raster channels to generate an output raster combination of the two input channels.

The output thematic raster layer contains attributes consisting of all of the input attribute fields. Essentially, a union of the input attribute fields is generated. If there is an attribute in the secondary table with the same name as one in the primary table, a merge of the attributes is performed. For example, stamping a LandCover thematic raster (secondary) with a Lakes (primary) thematic raster. If an attribute named Type exists in both tables, the output will have a field named Type and the entries from the secondary values will be copied and inserted appropriately in the output table. When an attribute exists only in one of the input channels, the output will contain "No Data" entries for that field.

The output raster type (8U, 16S, 16U, or 32R) is dependent on the raster type of the input channels. In general, the output raster type will be the highest of the input raster types; therefore, combining an 8U channel with a 16S channel will result in a 16S output channel. In some cases, a further check is required, involving the range of values. The output raster type should only be as large as required. Combining an 16S with a 16U could result in a 16S if the output values are between -32K and 32K, a 16U if output values are between 0 and 64K, and a 32R if nothing else is sufficient. In the case of Stamp, extra care must be taken because the output values can have a range of more than either of the inputs.

There must be exactly two input channels: a primary and a secondary. The primary input sets the projection and pixel size for the output raster. The secondary raster will be resampled, if necessary, to match the pixel size of the master input. The primary raster channel must contain a "No Data" value.

You may also specify an optional bitmap mask input. If a mask is specified, only pixels under the mask are processed.

Two methods are available for generating the output raster channel:
Back to top

Example

This example demonstrates the use of STAMPJOIN in generating a raster layer which is a combination of the two input layers.

from pci.stampjoin import stampjoin

fili	=	"l7_ms.pix"	# input file
filo	=	"smp.pix"	# output file, will be created
dbic	=	[7,8]	# input raster channels
dbib	=	[9]	# bitmap mask segment
dboc	=	[]	# new output channel will be created
methods	=	"JOIN"

stampjoin( fili, filo, dbic, dbib, dboc, methods )

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