TransposeBits

Zusammenfassung

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.

Auswertung

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.

Syntax

TransposeBits (raster, {input_bit_positions}, {output_bit_positions}, {constant_fill_value}, {fill_raster})
ParameterErklärungDatentyp
raster

The input raster to unpack and remap.

Raster
input_bit_positions
[input_bit_positions,...]

The list of input bits.

(Der Standardwert ist [12, 13])

Integer
output_bit_positions
[output_bit_positions,...]

The list of output bits.

(Der Standardwert ist [0, 1])

Integer
constant_fill_value

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

(Der Standardwert ist 0)

Integer
fill_raster

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

(Der Standardwert ist None)

Raster
Rückgabewert
DatentypErklärung
Raster

The output raster.

Codebeispiel

TransposeBits example

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

import acrpy

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