MAP

Bitmap to channel encoding


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

Back to top

Description


MAP provides encoding of bitmaps into an image channel using a user-defined constant as a gray level.
Back to top

Parameters


map(file, dbib, valu, dboc)

Name Type Caption Length Value range
FILE * str Input raster image 1 -    
DBIB * List[int] Input bitmap segment or layer 1 -    
VALU * List[float] Gray-level values 1 -    
DBOC * List[int] Output encoded bitmap channel 1 - 1  

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the PCIDSK image file containing a bitmap channel or layer to be encoded.

DBIB

Specifies the bitmap segments from the input image to be embedded in the output image channel.

The gray-level value corresponding to each bitmap by position is the assigned gray level.

VALU

Specifies a real value that will be assigned to areas under the specified input bitmap (DBIB).

The number of values must be less than or equal to the number of bitmap segments listed in DBIB. If the number of values is less than the number of segments, the last value in the value list will be assigned to the remaining segments in the expanded bitmap segment list.

Acceptable gray level values depend on the channel data type:

DBOC

Specifies the output image channel to contain the encoded bitmaps.

Only one channel may be specified.

Back to top

Details

Bitmaps are encoded by setting the image area under each bitmap to the appropriate gray-level value. Values not located under a bitmap remain unchanged.

MAP allows the analyst to build up a socio-political area map for classification (sub-totalization, for example).

Any set of database bitmap segments (DBIB) may be encoded on output image channel (DBOC). The gray-level value used for encoding each bitmap is specified using the gray-level value parameter (VALU).

Ideally, the set of bitmaps should be non-overlapping. If there is overlap, however, the image channel is encoded with the segment value of the last overlapping bitmap segment.

The THR program performs the opposite of MAP, extracting specific ranges of image values to form a bitmap. The CLR program is similar to MAP, but burns a specific value into an image over a user-defined window.

Back to top

Example

Create a bitmap using DCP, by drawing rectangle polygons, filling them, and saving them on the database. Then, encode the bitmaps on the image channel with a specified gray level value.

Image channel DBIC = 1, from the file "AGRIHOT";


                                         1   1   1   1   1   1   1
     1   2   3   4   5   6   7   8   9   0   1   2   3   4   5   6
   +--------------------------------------------------------------
  1| 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
  2| 1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
  3| 3   3   3   3   3   3   3   3   3   3   3   3   3   3   3   3
  4| 4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
  5| 5   5   5   5   5   5   5   5   5   5   5   5   5   5   5   5
  6| 6   6   6   6   6   6   6   6   6   6   6   6   6   6   6   6
  7| 7   7   7   7   7   7   7   7   7   7   7   7   7   7   7   7
  8| 8   8   8   8   8   8   8   8   8   8   8   8   8   8   8   8
  9| 9   9   9   9   9   9   9   9   9   9   9   9   9   9   9   9
 10|10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
 11|11  11  11  11  11  11  11  11  11  11  11  11  11  11  11  11
 12|12  12  12  12  12  12  12  12  12  12  12  12  12  12  12  12
 13|13  13  13  13  13  13  13  13  13  13  13  13  13  13  13  13
 14|14  14  14  14  14  14  14  14  14  14  14  14  14  14  14  14
 15|15  15  15  15  15  15  15  15  15  15  15  15  15  15  15  15
 16|16  16  16  16  16  16  16  16  16  16  16  16  16  16  16  16

Bitmap segment DBIB = 1, from the image file "AGRIHOT";


              1 1 1
    1 3 5 7 9 1 3 5
   +----------------
  1|
  2|
  3|
  4|
  5|    XXXXXXXXX
  6|    XXXXXXXXX
  7|    XXXXXXXXX
  8|    XXXXXXXXX
  9|
 10|
 11|
 12|
 13|
 14|
 15|
 16|

Encode areas under bitmap 1 on channel 1 with gray level values of 222.

from pci.map import map

file = "AGRIHOT"
dbib = [1]      # Select bitmaps for encoding
dboc = [1]      # Select channel to be encoded
valu = [222]    # Specify gray level values

map( file, dbib, valu, dboc )

                                         1   1   1   1   1   1   1
     1   2   3   4   5   6   7   8   9   0   1   2   3   4   5   6
   +--------------------------------------------------------------
  1| 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
  2| 1   1   1   1   1   1   1   1   1   1   1   1   1   1   1   1
  3| 3   3   3   3   3   3   3   3   3   3   3   3   3   3   3   3
  4| 4   4   4   4   4   4   4   4   4   4   4   4   4   4   4   4
  5| 5   5   5   5 222 222 222 222 222 222 222 222 222   5   5   5
  6| 6   6   6   6 222 222 222 222 222 222 222 222 222   6   6   6
  7| 7   7   7   7 222 222 222 222 222 222 222 222 222   7   7   7
  8| 8   8   8   8 222 222 222 222 222 222 222 222 222   8   8   8
  9| 9   9   9   9   9   9   9   9   9   9   9   9   9   9   9   9
 10|10  10  10  10  10  10  10  10  10  10  10  10  10  10  10  10
 11|11  11  11  11  11  11  11  11  11  11  11  11  11  11  11  11
 12|12  12  12  12  12  12  12  12  12  12  12  12  12  12  12  12
 13|13  13  13  13  13  13  13  13  13  13  13  13  13  13  13  13
 14|14  14  14  14  14  14  14  14  14  14  14  14  14  14  14  14
 15|15  15  15  15  15  15  15  15  15  15  15  15  15  15  15  15
 16|16  16  16  16  16  16  16  16  16  16  16  16  16  16  16  16

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