1. Arcmap工具箱搜索“栅格计算器”
SetNull((IsNull(“raster1.tif”) | IsNull(“raster2.tif”)),1)
2. 写为python
#两个栅格取交集
#arcmap,python
#=============================
# 参数
raster_1 = "d:/try/allMask.tif"
raster_2 = "d:/try/offMask.tif"
out_path = "d:/try/interMask.tif"
#两个栅格的交集,赋值为1
inter_raster = SetNull((IsNull(raster_1) | IsNull(raster_2)),1)
#输出
inter_raster.save(out_path)