本文簡要介紹 python 語言中 arcgis.raster.functions.band_arithmetic
的用法。
用法:
arcgis.raster.functions.band_arithmetic(raster, band_indexes=None, astype=None, method=0)
返回:
應用了函數的輸出柵格。
band_arithmetic 函數對柵格的波段執行算術運算。欲了解更多信息,請參閱Band Arithmetic function
Parameter
Description
raster
需要輸入
Raster
/ImageryLayer
對象。band_indexes
可選字符串或列表。帶索引可以以空格分隔的字符串或整數或浮點值列表的形式給出。例如,“4 3”或 [4,3]。對於用戶定義的方法,波段索引可以以表達式形式給出,例如“(B3 - B1)/(B3 + B1)”。
astype
可選字符串。指定輸出像素類型。可用選項是 - “C128” | “C64” | “F32” | “F64” | “S16” | “S32” | “S8” | “U1” | “U16” | “U2” | “U32” | “U4” | “U8”。默認為無。
method
可選的整數。您要部署的波段算術算法的類型。您可以定義自定義算法,或選擇預定義的索引。
0 = UserDefined
1 = NDVI
2 = SAVI
3 = TSAVI
4 = MSAVI
5 = GEMI
6 = PVI
7 = GVITM
8 = Sultan
9 = VARI
10 = GNDVI
11 = SR
12 = NDVIre
13 = SRre
14 = MTVI2
15 = RTVICore
16 = CIre
17 = CIg
18 = NDWI
19 = EVI
20 = IronOxide
21 = FerrousMinerals
22 = ClayMinerals
23 = WNDWI
24 = BAI
25 = NBR
26 = NDBI
27 = NDMI
28 = NDSI
29 = MNDW
例子:
# Usage Example 1: Apply the 'NDVI' band arithmetic algorithm on the input raster. band_op = band_arithmetic(raster, method=1) # Usage Example 2: Apply user defined band arithmetic algorithm on the input raster. band_operation = "(B3 - B1)/(B3 + B1)" band_op = band_arithmetic(raster, band_indexes=band_operation, method=0)
相關用法
- Python ArcGIS batch_geocode用法及代碼示例
- Python ArcGIS build_overview用法及代碼示例
- Python ArcGIS build_multidimensional_transpose用法及代碼示例
- Python ArcGIS bitwise_not用法及代碼示例
- Python ArcGIS build_footprints用法及代碼示例
- Python ArcGIS bitwise_left_shift用法及代碼示例
- Python ArcGIS bitwise_xor用法及代碼示例
- Python ArcGIS bitwise_right_shift用法及代碼示例
- Python ArcGIS boolean_or用法及代碼示例
- Python ArcGIS boundary_clean用法及代碼示例
- Python ArcGIS boolean_not用法及代碼示例
- Python ArcGIS bitwise_or用法及代碼示例
- Python ArcGIS boolean_and用法及代碼示例
- Python ArcGIS boolean_xor用法及代碼示例
- Python ArcGIS build_multivariable_grid用法及代碼示例
- Python ArcGIS bitwise_and用法及代碼示例
- Python ArcGIS buffer用法及代碼示例
- Python ArcGIS power用法及代碼示例
- Python ArcGIS APIKeyManager.get用法及代碼示例
- Python ArcGIS KnowledgeGraph.named_object_type_delete用法及代碼示例
- Python ArcGIS ContentManager.unshare_items用法及代碼示例
- Python ArcGIS ImageryLayer.thumbnail用法及代碼示例
- Python ArcGIS FormFieldElement用法及代碼示例
- Python ArcGIS Geometry.true_centroid用法及代碼示例
- Python ArcGIS Site.delete用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.raster.functions.band_arithmetic。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。