TransposeBits

Résumé

Creates a raster object by unpacking the bits of the input pixel and mapping them to specified bits in the output pixel. The purpose of this function is to manipulate bits from a couple of inputs, such as the Landsat 8 quality band products.

Discussion

For more information about how this function works, see the Transpose Bits raster function.

The referenced raster dataset for the raster object is temporary. To make it permanent, you can call the raster object's save method.

Syntaxe

TransposeBits (raster, {input_bit_positions}, {output_bit_positions}, {constant_fill_value}, {fill_raster})
ParamètreExplicationType de données
raster

The input raster to unpack and remap.

Raster
input_bit_positions
[input_bit_positions,...]

The list of input bits.

(La valeur par défaut est [12, 13])

Integer
output_bit_positions
[output_bit_positions,...]

The list of output bits.

(La valeur par défaut est [0, 1])

Integer
constant_fill_value

An integer used to fill in all bits that are not involved in the transpose.

(La valeur par défaut est 0)

Integer
fill_raster

A raster used to fill in all bits that are not involved in the transpose.

(La valeur par défaut est None)

Raster
Valeur renvoyée
Type de donnéesExplication
Raster

The output raster.

Exemple de code

TransposeBits example

Remaps the bits from the input raster to the Landsat 8 Water bit pattern.

import acrpy

transpose_raster = arcpy.ia.TransposeBits("Landsat_8.tif",[4, 5],[0, 1], 0, None)