本文簡要介紹 python 語言中 arcgis.raster.functions.hillshade
的用法。
用法:
arcgis.raster.functions.hillshade(dem, azimuth=215.0, altitude=75.0, z_factor=0.3, slope_type=1, ps_power=None, psz_factor=None, remove_edge_effect=None, astype=None, hillshade_type=0)
返回:
應用了函數的輸出柵格。給它。
山體陰影是表麵的灰度 3D 模型,它考慮了太陽的相對位置來對圖像進行陰影處理。有關詳細信息,請參閱 hillshade function 和 How hillshade works 。
山體陰影函數的參數如下:
Parameter
Description
dem
從 DEM 創建所需的
Raster
/ImageryLayer
對象。azimuth
可選浮點數。方位角是太陽沿地平線的相對位置(以度為單位)。該位置由從正北順時針測量的太陽角度表示。方位角 0 度表示北,東為 90 度,南為 180 度,西為 270 度。
此參數僅在hillshade_type 為 0(0 = 傳統)時有效。默認值為 215 度,即來自西南方向。
altitude
可選浮點數。高度是太陽在地平線以上的仰角,範圍從 0 到 90 度。 0 度的值表示太陽在地平線上,即與參考係在同一水平麵上。 90 度的值表示太陽直接在頭頂。
此參數僅在hillshade_type 為 0(0 = 傳統)時有效。默認值為高於地平線 75 度。
z_factor
可選浮點數。用於轉換高程值的比例因子有兩個目的:
將高程單位(例如米或英尺)轉換為數據集的水平坐標單位,可以是英尺、米或度。
為視覺效果添加垂直誇張。
默認值為 0.3。
slope_type
(10.2 新增)可選浮點數。
- 可用的選項是 -
1=學位
2=百分比
3=縮放。
默認值為 1。
ps_power
(10.2 新增)可選浮點數。當查看器在Map顯示上放大和縮小時,像素大小功率考慮了海拔變化(或比例)。與 SCALED 斜坡類型一起使用。
psz_factor
(10.2 新增)可選浮點數。像素尺寸因子控製 z_factor 變化的速率。與 SCALED 斜坡類型一起使用。
remove_edge_effect
(10.2 新增)可選布爾值。使用此選項將避免沿柵格邊可能出現的任何重采樣偽影。可選的布爾值。
False - 將統一應用雙線性重采樣以重采樣輸出。
True - 雙線性重采樣將用於對輸出進行重采樣,但沿柵格邊或 NoData 像素旁邊的情況除外。
astype
可選字符串。指定輸出像素類型。可用選項是 - “C128” | “C64” | “F32” | “F64” | “S16” | “S32” | “S8” | “U1” | “U16” | “U2” | “U32” | “U4” | “U8”。默認為無。
hillshade_type
可選的整數。控製山體陰影的照明源。
0 = 傳統的。從單個照明方向計算山體陰影。您可以設置方位角和高度參數來控製光源的位置。這是默認設置。
1 = Multi-directional。結合來自多個來源的光來表示地形的增強可視化。
默認值為 0。
例子:
# Usage Example 1: Produces a hillshade of the input raster with the sun located east and 80 degrees overhead. hillshade_op = hillshade(raster, azimuth=90, altitude=80)
相關用法
- 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用法及代碼示例
- Python ArcGIS describe_dataset用法及代碼示例
- Python ArcGIS acos用法及代碼示例
- Python ArcGIS Item.publish用法及代碼示例
- Python ArcGIS MapImageLayer.find用法及代碼示例
- Python ArcGIS Group.get_members用法及代碼示例
- Python ArcGIS Geometry.last_point用法及代碼示例
- Python ArcGIS Worker用法及代碼示例
- Python ArcGIS ContentManager.delete_folder用法及代碼示例
- Python ArcGIS train_classifier用法及代碼示例
- Python ArcGIS APIKeyManager.create用法及代碼示例
- Python ArcGIS negate用法及代碼示例
- Python ArcGIS add_image用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 arcgis.raster.functions.hillshade。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。