| Environments | PYTHON :: EASI :: MODELER |
| Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Example :: Related |
| Back to top |
| Back to top |
blo(file, logfunc, dbsn, dbsd, dbib, dbob, lasc)
| Name | Type | Caption | Length | Value range |
|---|---|---|---|---|
| FILE * | str | Input file name | 1 - | |
| LOGFUNC * | str | Function: AND/OR/XOR/SUB/NOT | 2 - 3 | AND, OR, XOR, SUB, NOT |
| DBSN | str | Output segment name | 0 - 8 | |
| DBSD | str | Output segment description | 0 - 64 | |
| DBIB * | List[int] | Input bitmap channels | 1 - 2 | -1024 - |
| DBOB | List[int] | Output bitmap | 0 - 1 | |
| LASC | List[int] | Last segment created | 0 - 1 |
| Back to top |
FILE
Specifies the name of the PCIDSK file in which the input and output bitmap segments reside.
LOGFUNC
The simple logical operators have the following truth tables:
i|j| i AND j i|j| i OR j i|j| i XOR j +-+-+-------- -+-+------- -+-+-------- 0|0| 0 0|0| 0 0|0| 0 0|1| 0 0|1| 1 0|1| 1 1|0| 0 1|0| 1 1|0| 1 1|1| 1 1|1| 1 1|1| 0 i|j| i SUB j = i AND NOT j i| NOT i +-+-+-------- -+------ 0|0| 0 0| 1 0|1| 0 1| 0 1|0| 1 1|1| 0
DBSN
Bitmap segment names are no longer supported, so the DBSN value is ignored. The DBSN parameter still remains to provide compatability for legacy applications.
DBSD
Describes (in up to 64 characters) the contents or origins of the output bitmap.
DBIB
Specifies two input bitmap channels for logical operation. Two bitmaps are required for all operations, except "NOT", which requires only one.
DBIB=i,[j]
DBOB
Optionally specifies the output bitmap segment to receive the generated logical result.
If this parameter is explicitly specified, the bitmap segment is overwritten. If it is not specified, a new bitmap segment is created.
LASC
The segment number of the newly created bitmap segment is saved in this output parameter.
| Back to top |
BLO performs logical operations on two database bitmap segments, unless the logical "NOT" has been specified, in which case only one bitmap is allowed.
If the output bitmap is specified, BLO writes the results of the logical operation to the specified segment number provided it exists and is of bitmap type (101). This bitmap segment will be overwritten without warning.
To obtain a list of existing bitmap segments, ASL can be used with the ASLT parameter set to 101. In this case, the bitmap layer name and bitmap layer description are ignored. (Use MAS to change these.)
If no output bitmap is specified, BLO creates a new bitmap segment. A segment name of up to 8 characters must be specified and an optional 64-character description may be specified.
When a new bitmap segment is created, a message appears on the terminal providing the segment number of the newly created segment. This new segment number is saved in the LASC parameter.
| Back to top |
Using BLO, generate a new bitmap segment that uses the logical operator "OR" between the two input segments.
from pci.blo import blo file = "irvine.pix" # input file name logfunc = "OR" # logical operation dbsn = "OR1.4" # segment name dbsd = "Logical OR" # segment descriptor dbib = [9,10] # input bitmaps dbob = [] # output bitmap lasc = [] blo( file, logfunc, dbsn, dbsd, dbib, dbob, lasc )
© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.