TransposeBits

Resumen

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.

Debate

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.

Sintaxis

TransposeBits (raster, {input_bit_positions}, {output_bit_positions}, {constant_fill_value}, {fill_raster})
ParámetroExplicaciónTipo de datos
raster

The input raster to unpack and remap.

Raster
input_bit_positions
[input_bit_positions,...]

The list of input bits.

(El valor predeterminado es [12, 13])

Integer
output_bit_positions
[output_bit_positions,...]

The list of output bits.

(El valor predeterminado es [0, 1])

Integer
constant_fill_value

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

(El valor predeterminado es 0)

Integer
fill_raster

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

(El valor predeterminado es None)

Raster
Valor de retorno
Tipo de datosExplicación
Raster

The output raster.

Muestra de código

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)