摘要
用于创建可同时显示表面坡向和坡度的栅格对象。
语法
AspectSlope (raster, {z_factor})
参数 | 说明 | 数据类型 |
raster | The input elevation raster. | Raster |
z_factor | The z-factor is a scaling factor used to convert the elevation values for the following purposes:
If the x,y units and z units are in the same units of measure, the z-factor should be set to 1. The z-values of the input surface are multiplied by the z-factor when calculating the final output surface. (默认值为 1) | Double |
数据类型 | 说明 |
Raster | 输出栅格。 |
代码示例
本示例将计算栅格的坡向和坡度。
from arcpy.sa import *
out_aspectslope_raster = AspectSlope("elevation.tif", 3)
out_aspectslope_raster.save("C:/arcpyExamples/outputs/aspectslope.tif")
本示例将计算栅格的坡向和坡度。
# Import the system modules
import arcpy
from arcpy.sa import *
# Set the analysis environments
arcpy.env.workspace = "C:/arcpyExamples/data"
# Set the local variables
in_raster = "elevation.tif"
# Execute the AspectSlope function
out_aspectslope_raster = AspectSlope(in_raster, 3)
# Save the output
out_aspectslope_raster.save("C:/arcpyExamples/outputs/aspectslope.tif")