全部產品
Search
文件中心

AnalyticDB:ST_Slope

更新時間:Feb 05, 2024

計算坡度,返回弧度為單位的像元坡度數組。

文法

float8[] ST_Slope(raster rast, integer pyramid_level, integer band, Box extent, BoxType type, float8 zfactor);

參數

參數名稱描述
rastraster對象。
pyramid_level計算的金字塔等級。
Band波段索引號
box分析地區,格式為'((m inX,m inY), (m axX,m axY))'
type分析地區的座標類型,只能是以下一種:
  • Raster(影像座標)
  • World(全局座標)
zfactor高程誇張值,預設為1。

描述

坡度計算函數用於為每個像元計算值在從該像元到與其相鄰的像元方向上的最大變動率。實際上,高程隨著像元與其相鄰的八個像元之間距離的變化而產生的最大變動率,可用來識別自該像元開始的最陡坡降。

樣本

select st_slope(rast, 0, 0, '(0,0), (5,5)', 'Raster', 2.0) from t_surface where id=1;
                                                        st_slope                                                        
------------------------------------------------------------------------------------------------------------------------
 {0.210279822382945,0.369954478614613,0.220241089748741,0.415504885724335,0.523380429142649,0.19079849696355,0.32493941.
.6771785,0.592806538904308,0.559435506670953,0.487598684366856,0.17107200555711,0.0840217922621739,0.381860307736563,0..
.580949493078414,0.638382145824945,0.43822706997925,0.317039337499457,0.284095352866283,0.284298114561498,0.49448931974.
.7884,0.817870125632039,0.645927342349833,0.241209216517688,0.211549813235801,0.339040463954188,0.636582806346833,0.934.
.672430381381,0.7814534477193,0.0832677675316725,0.0544326656785603,0.529537557031012,0.836305912538514,0.9446346707062.
.92,0.747858756227042,0.0284106287186713,0.0616861154423774}
(1 row)