本文簡要介紹 python 語言中 arcgis.raster.functions.gbl.flow_direction
的用法。
用法:
arcgis.raster.functions.gbl.flow_direction(input_surface_raster, force_flow='NORMAL', flow_direction_type='D8', generate_out_drop_raster=False)
返回:
應用函數的輸出柵格
flow_direction
任務創建從每個像元到其最陡下坡鄰居的流向柵格。此任務支持三種流建模算法。它們是 D8、多流向 (MFD) 和 D-Infinity (DINF)。
D8流建模算法
D8 流動方法模擬從每個單元到其最陡下坡相鄰單元的流動方向。
以 D8 流向類型運行的FlowDirection 任務的輸出是一個整數柵格,其值範圍為 1-255。從中心開始的每個方向的值如下:
例如,如果最陡下降的方向在當前處理單元的左側,則其流向將編碼為 16。
以下是使用 D8 流法的其他注意事項:
If a cell is lower than its eight neighbors, that cell is given the value of its lowest neighbor, and flow is defined toward this cell. If multiple neighbors have the lowest value, the cell is still given this value, but flow is defined with one of the two methods explained below. This is used to filter out one-cell sinks, which are considered noise.
If a cell has the same change in z-value in multiple directions and that cell is part of a sink, the flow direction is referred to as undefined. In such cases, the value for that cell in the output flow direction raster will be the sum of those directions. For example, if the change in z-value is the same both to the right (flow direction = 1) and down (flow direction = 4), the flow direction for that cell is 5.
If a cell has the same change in z-value in multiple directions and is not part of a sink, the flow directions is assigned with a lookup table defining the most likely direction. See Greenlee (1987).
The output drop raster is calculated as the difference in z-value divided by the path length between the cell centers, expressed in percentages. For adjacent cells, this is analogous to the percent slop between cells. Across a flat area, the distance becomes the distance to the nearest cell of lower elevation. The result is a map of percent rise in the path of steepest descent from each cell.
When calculating a drop raster in flat areas, the distance to diagonally adjacent cells (1.41421 * cell size) is approximated by 1.5 * cell size for improved performance.
With the forceFlow parameter set to the default value False, a cell at the edge of the surface raster will flow towards the inner cell with the steepest z-value. If the drop is less than or equal to zero, the cell will flow out of the surface raster.
MFD 流動建模算法
秦等人說明的 MFD 算法。 (2007),分區從一個單元格流向所有下坡鄰居。 flow-partition index 是根據當地地形條件通過自適應方法創建的,用於確定流向所有下坡鄰居的流量比例。
將 MFD 流向輸出添加到Map時,它僅顯示 D8 流向。由於 MFD 流向可能具有與每個單元相關的多個值(每個值對應於流到每個下坡鄰居的流量比例),因此不容易可視化。但是,MFD 流向輸出柵格是 FlowAccumulation 任務識別的輸入,該任務將利用 MFD 流向對從每個像元到所有下坡鄰居的流量進行比例和累積。
DINF流建模算法
Tarboton (1997) 說明的 DINF 流動方法將流動方向確定為在以感興趣單元為中心的 3x3 單元窗口中形成的八個三角形麵上的最陡向下坡度。流向輸出是一個浮點柵格,表示為從 0(正東)到 360(也是正東)逆時針方向的單個角度(以度為單位)。
Parameter
Description
input_surface_raster
必需的。表示連續表麵的輸入柵格。
force_flow
可選字符串。指定邊單元是始終向外流動還是遵循正常流動規則。
選擇列表:[‘NORMAL’, ‘FORCE’]
默認值為“正常”。
flow_direction_type
可選字符串。指定要使用的流向類型。
選擇列表:[‘D8’、‘MFD’、‘DINF’]
D8
用於 D8 流向類型。這是默認設置。MFD
用於多流向類型。DINF
用於D-Infinity 類型。
默認值為“D8”。
generate_out_drop_raster
可選布爾值,確定是否應生成out_drop_raster。將此參數設置為 True,以便生成 out_drop_raster。如果設置為 true,則輸出將是一個命名元組,其名稱值為 output_flow_direction_service 和 output_drop_service。
例子:
# Usage Example: To add an image to an existing image collection. flow_direction_output = flow_direction(input_surface_raster=in_raster, force_flow="NORMAL", flow_direction_type="D8", generate_out_drop_raster=True) out_var = flow_direction_output.save() out_var.output_flow_direction_service # gives you the output flow direction imagery layer item out_var.output_drop_service # gives you the output drop raster imagery layer item
相關用法
- Python ArcGIS float_divide用法及代碼示例
- Python ArcGIS floor_divide用法及代碼示例
- Python ArcGIS find_centroids用法及代碼示例
- Python ArcGIS forest用法及代碼示例
- Python ArcGIS from_geo_coordinate_string用法及代碼示例
- Python ArcGIS find_point_clusters用法及代碼示例
- Python ArcGIS find_existing_locations用法及代碼示例
- Python ArcGIS find_nearest用法及代碼示例
- Python ArcGIS find_hot_spots用法及代碼示例
- Python ArcGIS find_outliers用法及代碼示例
- Python ArcGIS find_argument_statistics用法及代碼示例
- Python ArcGIS find_similar_locations用法及代碼示例
- 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用法及代碼示例
- Python ArcGIS GeoAccessor.bbox用法及代碼示例
- Python arcgis.apps.hub.Initiative.update用法及代碼示例
- Python ArcGIS generate_service_areas用法及代碼示例
- Python ArcGIS build_overview用法及代碼示例
- Python ArcGIS RunInterval用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.raster.functions.gbl.flow_direction。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。