Skip to main content

布尔数学工具的工作原理

需具备 Spatial Analyst 许可方可使用。

需具有 Image Analyst 许可才能使用。

布尔数学工具将输入像元值转换为布尔值,其中将非零值视为“真”,值 0 视为“假”。 将逐个像元地对输入栅格进行测试。

有四种执行布尔逻辑运算的工具:布尔与布尔或布尔异或布尔非

布尔逻辑条件

下面介绍了每个布尔逻辑条件的逻辑。

布尔与

如果两个值都为真,则输出值为 1。 如果一个或两个值为假,则输出值为 0。

Input1 ≠ 0 and Input2 ≠ 0, Output = 1
Input1 ≠ 0 and Input2 = 0, Output = 0
Input1 = 0 and Input2 ≠ 0, Output = 0
Input1 = 0 and Input2 = 0, Output = 0

布尔或

如果一个或两个值为真,则输出值为 1。 如果两个值都为假,则输出值为 0。

Input1 ≠ 0 and Input2 ≠ 0, Output = 1
Input1 ≠ 0 and Input2 = 0, Output = 1
Input1 = 0 and Input2 ≠ 0, Output = 1
Input1 = 0 and Input2 = 0, Output = 0

布尔异或

如果一个值为真,而另一个值为假,则输出值为 1。 如果两个值都为真或都为假,则输出值为 0。

Input1 ≠ 0 and Input2 ≠ 0, Output = 0
Input1 ≠ 0 and Input2 = 0, Output = 1
Input1 = 0 and Input2 ≠ 0, Output = 1
Input1 = 0 and Input2 = 0, Output = 0

布尔非

与其他布尔工具不同,布尔非只有一个输入。

如果值为真,则输出为 0(真的补集)。 如果输入值为假,则输出为 1。

Input1 ≠ 0, Output = 0
Input1 ≠ 0, Output = 1

NoData 处理

如果任一输入像元值为 NoData,则输出值也将为 NoData。