计算坡度,返回弧度为单位的像元坡度数组。

语法

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

参数

参数名称 描述
rast raster对象。
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)