サマリー
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.
説明
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.
構文
TransposeBits (raster, {input_bit_positions}, {output_bit_positions}, {constant_fill_value}, {fill_raster})
パラメーター | 説明 | データ タイプ |
raster | The input raster to unpack and remap. | Raster |
input_bit_positions [input_bit_positions,...] | The list of input bits. (デフォルト値は次のとおりです [12, 13]) | Integer |
output_bit_positions [output_bit_positions,...] | The list of output bits. (デフォルト値は次のとおりです [0, 1]) | Integer |
constant_fill_value | An integer used to fill in all bits that are not involved in the transpose. (デフォルト値は次のとおりです 0) | Integer |
fill_raster | A raster used to fill in all bits that are not involved in the transpose. (デフォルト値は次のとおりです None) | Raster |
データ タイプ | 説明 |
Raster | The output raster. |
コードのサンプル
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)