THMRMER

Merge a thematic raster, based on attributes


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

Back to top

Description


Creates a new thematic raster based on merging pixel values by attributes.
Back to top

Parameters


thmrmer(fili, filo, dbic, dboc, adjshp, joindgl, attrlist)

Name Type Caption Length Value range
FILI * str Input file name 1 -    
FILO str Output file name 0 -    
DBIC * List[int] Input thematic raster channel 1 - 1  
DBOC List[int] Output thematic raster channel 0 - 1  
ADJSHP str Shape merging method 0 - 15 ADJACENT | ALL
Default: ADJACENT
JOINDGL str Join polygons at diagonal 0 - 3 YES | NO
Default: YES
ATTRLIST str Attribute names 0 - 660  

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the PCIDSK file that contains the thematic raster image channel.

FILO

Specifies the name of the PCIDSK image file to receive the processed thematic raster channel. If the output file is not specified, it will be assumed to be the same as FILI. If the specified output file already exists, its projection must be the same as that of the input file.

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

DBIC

Specifies the input channel that contains the input raster or thematic raster.

DBOC

Specifies the output channel to receive the generated thematic raster.

If the specified output file (FILO) exists, this parameter must be specified.

ADJSHP

Specifies the method to use for merging shapes.

Available options are:
Note: If the shape merging method (ADJSHP) is set to ALL (All Shapes), Join At Diagonal (JOINDGL) should be set to YES.

JOINDGL

Specifies whether to join polygons at diagonals.

Available options are:
Note: If the shape merging method (ADJSHP) is set to ALL (All Shapes), Join At Diagonal (JOINDGL) should be set to YES.

ATTRLIST

Specifies the list of attributes to use for merging.

This parameter can list 10 attributes, separated by blank spaces.

Back to top

Details

THMRMER merges classes within a thematic raster to create a new thematic raster with aggregated classes. The classes to be merged are based on the attribute(s) specified. For two classes to be merged, the value within the specified attribute(s) must be the same for those two classes. The location of the pixels that form the classes can also be taken into account, if desired. You can specify that only adjacent (neighboring) pixels are to be merged, or that all of the classes that are attribute matches should be merged.

For example, suppose you have detailed data at the county level for a whole country, but are only interested in information at the state/provincial level. If the county data has an attribute indicating the state/province to which it belongs, you can use THMRMER to aggregate the county classes together to a state/provincial level.

If you want more control over the attributes that you want in the output thematic raster, you can use the Dissolve tool in CATALYST Professional Focus.

Back to top

Example

This example demonstrates the use of THMRMER to generate a thematic raster layer based on attributes.

from pci.thmrmer import thmrmer

fili	=	"thmrcover.pix"	# input file
filo	=	"output.pix"	# output file
dbic	=	[1]	# input thematic raster channel
dboc	=	[1]	# output channel
adjshp	=	"ADJACENT"	# adjacent shapes
joindgl	=	"YES"	# join at diagonal
attrlist	=	"Perimeter theme1"	# field names(attributes)

thmrmer( fili, filo, dbic, dboc, adjshp, joindgl, attrlist )

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